/**
 * F1GMAT Share · action row, Save pop-up, Follow menu, and the print
 * (PDF) stylesheet. Colours and fonts are custom properties so a theme
 * can match them without overriding selectors.
 */
.f1gmat-actions {
  --f1gmat-actions-ink: #1a1a1a;
  --f1gmat-actions-ink-soft: #3d3d3d;
  --f1gmat-actions-muted: #525252;
  --f1gmat-actions-accent: #0e7490;
  --f1gmat-actions-accent-soft: #f2f7f8;
  --f1gmat-actions-line: #b8bdc4;
  --f1gmat-actions-font: Roboto, Arial, Helvetica, sans-serif;
  margin: 6px 0 30px;
  font-family: var(--f1gmat-actions-font);
}
.f1gmat-actions__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 26px;
}
.f1gmat-actions__item { position: relative; }
.f1gmat-actions__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--f1gmat-actions-ink);
  font: 400 17px/1 var(--f1gmat-actions-font);
  cursor: pointer;
}
.f1gmat-actions__btn[hidden] { display: none; }
.f1gmat-actions__btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.f1gmat-actions__btn:hover span,
.f1gmat-actions__btn[aria-expanded="true"] span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.f1gmat-actions__btn.is-saved svg path { fill: var(--f1gmat-actions-accent); stroke: var(--f1gmat-actions-accent); }
.f1gmat-actions__btn:focus-visible,
.f1gmat-actions__google:focus-visible,
.f1gmat-follow__link:focus-visible,
.f1gmat-message__button:focus-visible {
  outline: 2px solid var(--f1gmat-actions-accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.f1gmat-actions__pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  color: var(--f1gmat-actions-ink);
}
.f1gmat-actions__pop[hidden] { display: none; }
.f1gmat-actions__pop--share { padding: 0; }
.f1gmat-actions__pop--share .f1gmat-share-menu { border: 0; }
.f1gmat-actions__pop-title { margin: 0 0 10px; padding-right: 36px; font-size: 16px; font-weight: 700; }
/* The × in the top-right corner of the Follow and Share menus. */
.f1gmat-actions__pop-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background: none !important;
  color: var(--f1gmat-actions-ink) !important;
  line-height: 0;
  cursor: pointer;
}
/* A drawn X, the same in every font. */
.f1gmat-actions__pop-close svg,
.f1gmat-actions__info-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.f1gmat-actions__pop-close:hover { background: rgba(0, 0, 0, .06) !important; }
.f1gmat-actions__pop-close:focus-visible { outline: 2px solid var(--f1gmat-actions-accent); outline-offset: -2px; }
.f1gmat-actions__pop--share .f1gmat-share-menu__title { padding-right: 36px; }
.f1gmat-actions__google-item {
  order: 99;
  margin: 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Google preferred source: a white pill with Google's "G" on its own line
   under the action row, aligned left with Comments. One line on desktop;
   on narrow phones the label wraps to two lines inside the pill. */
.f1gmat-actions__row::after {
  content: "";
  flex-basis: 100%;
  order: 98;
  height: 0;
}
.f1gmat-actions__google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--f1gmat-actions-line);
  border-radius: 22px;
  background: #fff;
  color: var(--f1gmat-actions-ink);
  font: 500 15px/1.25 var(--f1gmat-actions-font);
  text-decoration: none;
}
.f1gmat-actions__google:hover { background: #f5f5f5; }
.f1gmat-actions__google-text { white-space: nowrap; }
/* Article themes size every image in the body (height: auto, max-width:
   100%), which would show the "G" at its file size. */
.f1gmat-actions .f1gmat-actions__google img.f1gmat-actions__google-icon {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
}

/* The "i" button and its dark explanation box, with a caret under the "i". */
.f1gmat-actions__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--f1gmat-actions-ink);
  cursor: pointer;
}
.f1gmat-actions__info svg,
.f1gmat-actions__pop-icon { width: 22px; height: 22px; fill: currentColor; }
.f1gmat-actions__info-mark { fill: #fff; }
.f1gmat-actions__info:hover,
.f1gmat-actions__info[aria-expanded="true"] { background: rgba(0, 0, 0, .06); }
.f1gmat-actions__info:focus-visible,
.f1gmat-actions__info-close:focus-visible {
  outline: 2px solid var(--f1gmat-actions-accent);
  outline-offset: 2px;
}
.f1gmat-actions__pop--info {
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 6px 14px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--f1gmat-actions-ink);
  color: #fff;
}
.f1gmat-actions__pop--info[hidden] { display: none; }
.f1gmat-actions__pop--info::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 15px;
  border: 7px solid transparent;
  border-top: 0;
  border-bottom-color: var(--f1gmat-actions-ink);
}
.f1gmat-actions__pop--info .f1gmat-actions__pop-icon { flex: 0 0 auto; margin-top: 2px; color: #fff; }
.f1gmat-actions__pop--info .f1gmat-actions__info-mark { fill: var(--f1gmat-actions-ink); }
.f1gmat-actions__info-text { flex: 1 1 auto; margin: 0; font: 400 15px/1.5 var(--f1gmat-actions-font); color: #fff; }
.f1gmat-actions__info-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  line-height: 0;
  cursor: pointer;
}

/* Follow. */
.f1gmat-follow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.f1gmat-follow__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: rgba(0, 0, 0, .05);
  color: var(--f1gmat-actions-ink);
  font: 500 14px/1 var(--f1gmat-actions-font);
  text-decoration: none;
}
.f1gmat-follow__link:hover { background: rgba(0, 0, 0, .1); }
.f1gmat-message--follow { margin-top: 14px; }

/* The email message (Save pop-up, Follow menu). */
.f1gmat-message {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--f1gmat-actions-accent);
  border-radius: 0 8px 8px 0;
  background: var(--f1gmat-actions-accent-soft);
}
.f1gmat-message__heading { margin: 0 0 4px; font: 700 16px/1.35 var(--f1gmat-actions-font); color: var(--f1gmat-actions-ink); }
.f1gmat-message__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--f1gmat-actions-ink-soft); }
.f1gmat-message__button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--f1gmat-actions-accent);
  color: #fff;
  font: 700 14px/1.2 var(--f1gmat-actions-font);
  text-decoration: none;
}
.f1gmat-message--after { margin: 16px 0 0; }

/* Save pop-up. */
.f1gmat-save {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  color: var(--f1gmat-actions-ink);
  font-family: var(--f1gmat-actions-font);
}
.f1gmat-save::backdrop { background: rgba(26, 26, 26, .55); }
.f1gmat-save__inner { position: relative; padding: 26px 24px 22px; }
.f1gmat-save__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--f1gmat-actions-ink-soft);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.f1gmat-save__close:hover { background: #f2f2f2; }
.f1gmat-save__title { margin: 0 44px 6px 0; font: 700 22px/1.25 var(--f1gmat-actions-font); }
.f1gmat-save__title:focus { outline: none; }
.f1gmat-save__meta { margin: 0 0 18px; font-size: 14px; color: var(--f1gmat-actions-muted); }
.f1gmat-save__label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.f1gmat-save__optional { font-weight: 400; color: var(--f1gmat-actions-muted); }
.f1gmat-save .f1gmat-save__email {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #919297;
  border-radius: 8px;
  font-size: 16px;
}
.f1gmat-save__email:focus { outline: 2px solid var(--f1gmat-actions-accent); outline-offset: 1px; }
.f1gmat-save__check { margin: 10px 0 4px; min-height: 0; }
.f1gmat-save__error { margin: 8px 0 0; color: #b91c1c; font-size: 13px; }
.f1gmat-save__error[hidden] { display: none; }
.f1gmat-save__go {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 24px;
  background: var(--f1gmat-actions-ink);
  color: #fff;
  font: 700 16px var(--f1gmat-actions-font);
  cursor: pointer;
}
.f1gmat-save__go:hover { background: #333; }
.f1gmat-save__go:focus-visible { outline: 3px solid var(--f1gmat-actions-accent); outline-offset: 2px; }
.f1gmat-save__small { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--f1gmat-actions-muted); }
.f1gmat-save__ok {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e6f4ea;
  color: #14532d;
  font-size: 15px;
  font-weight: 600;
}
.f1gmat-save__how { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--f1gmat-actions-ink-soft); }
.f1gmat-save__mc { margin: 0 0 6px; padding: 12px; border: 1px solid #cfe3e8; border-radius: 10px; background: var(--f1gmat-actions-accent-soft); }
.f1gmat-save__mc p { margin: 0; font-size: 14px; }
.f1gmat-save__mc[hidden], .f1gmat-save__done[hidden], .f1gmat-save__form[hidden] { display: none; }
.f1gmat-save__again {
  margin-top: 8px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: #0e5c8a;
  font: 500 14px var(--f1gmat-actions-font);
  text-decoration: underline;
  cursor: pointer;
}

/*
 * Theme guards. Article themes style every list and link inside the body
 * (gold bullet dots, teal underlined links). The menus sit inside the
 * article, so these rules keep the module's own look. !important is
 * limited to the properties themes are known to set.
 */
.f1gmat-actions ul.f1gmat-follow {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.f1gmat-actions .f1gmat-follow > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  background: none !important;
}
.f1gmat-actions .f1gmat-follow > li::before,
.f1gmat-actions .f1gmat-follow > li::after {
  content: none !important;
  display: none !important;
}
.f1gmat-actions .f1gmat-follow > li::marker { content: none; }
.f1gmat-actions a.f1gmat-follow__link,
.f1gmat-actions a.f1gmat-follow__link:link,
.f1gmat-actions a.f1gmat-follow__link:visited,
.f1gmat-actions a.f1gmat-follow__link:hover,
.f1gmat-actions a.f1gmat-follow__link:focus {
  color: var(--f1gmat-actions-ink) !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
.f1gmat-actions a.f1gmat-actions__google,
.f1gmat-actions a.f1gmat-actions__google:link,
.f1gmat-actions a.f1gmat-actions__google:visited {
  color: var(--f1gmat-actions-ink) !important;
  text-decoration: none !important;
  border: 1px solid var(--f1gmat-actions-line) !important;
  box-shadow: none !important;
  background: #fff !important;
}
.f1gmat-actions a.f1gmat-actions__google:hover,
.f1gmat-actions a.f1gmat-actions__google:focus {
  color: var(--f1gmat-actions-ink) !important;
  text-decoration: none !important;
  background: #f5f5f5 !important;
}
/* Theme rules that clear backgrounds (on divs with an id, or role="group")
   made the Follow box see-through. Each box keeps its own background. */
.f1gmat-actions .f1gmat-actions__pop { background: #fff !important; }
.f1gmat-actions .f1gmat-actions__pop--info { background: var(--f1gmat-actions-ink) !important; }
/* The subscribe button: F1GMAT teal, white text (5.4:1), no underline. */
.f1gmat-actions a.f1gmat-message__button,
.f1gmat-actions a.f1gmat-message__button:link,
.f1gmat-actions a.f1gmat-message__button:visited {
  background-color: var(--f1gmat-actions-accent) !important;
  color: #fff !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
.f1gmat-actions a.f1gmat-message__button:hover,
.f1gmat-actions a.f1gmat-message__button:focus {
  background-color: #0b5f75 !important;
  color: #fff !important;
  text-decoration: none !important;
}
/* A popover that would run past the window's right edge is moved left by
   the script (f1gmat-share-actions.js, keepInView). */

/* Phones: popovers and the Save pop-up as bottom sheets. */
@media (max-width: 767px) {
  .f1gmat-actions__row { gap: 2px 20px; }
  .f1gmat-actions__btn { font-size: 16px; }
  .f1gmat-actions__google-item { max-width: 100%; }
  .f1gmat-actions__pop--info::before { display: none; }
  /* Above fixed page furniture such as the essay review comment bar. */
  .f1gmat-actions__pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; z-index: 1200; width: auto; max-height: 80vh; overflow-y: auto; }
  .f1gmat-save { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
}

/* Narrow phones: the label wraps to two lines inside the pill. */
@media (max-width: 479px) {
  .f1gmat-actions__google { padding: 6px 14px 6px 12px; font-size: 14px; }
  .f1gmat-actions__google-text { white-space: normal; text-wrap: balance; }
}

/* Only in the PDF. */
.f1gmat-print-source,
.f1gmat-print-box { display: none; }

@media print {
  @page { size: portrait; margin: 18mm; }
  .f1gmat-actions__row,
  .f1gmat-save,
  .f1gmat-actions__pop,
  nav.f1gmat-share { display: none !important; }

  /* Fallback when the script did not run: hide the usual page parts. */
  html:not(.f1gmat-print) nav,
  html:not(.f1gmat-print) [role="navigation"],
  html:not(.f1gmat-print) header[role="banner"],
  html:not(.f1gmat-print) footer,
  html:not(.f1gmat-print) [role="contentinfo"],
  html:not(.f1gmat-print) .region-header,
  html:not(.f1gmat-print) .region-footer,
  html:not(.f1gmat-print) .region-sidebar-first,
  html:not(.f1gmat-print) .region-sidebar-second { display: none !important; }

  /*
   * The article only (f1gmat-share-actions.js marks it). On every level
   * from <html> down to the title, the article, the author bio and the
   * PDF box, every other element is hidden: sidebars, banners, promo and
   * newsletter blocks, related links, footers and cookie bars, whatever
   * the theme calls them.
   */
  html.f1gmat-print,
  html.f1gmat-print body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  .f1gmat-print-path > :not(.f1gmat-print-path):not(.f1gmat-print-keep),
  .f1gmat-print-drop { display: none !important; }
  /* The containers lose their columns, so the text uses the full page. */
  .f1gmat-print-path {
    display: block !important;
    position: static !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: visible !important;
    background: none !important;
  }
  .f1gmat-print-keep {
    position: static !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }
  .f1gmat-print-keep :is(div, section, header, footer, main, p, ul, ol, dl, blockquote, table, h2, h3, h4, h5, h6) { max-width: none !important; }
  /* Images print even when a lazy loader keeps them faded (opacity 0). */
  .f1gmat-print-keep img { max-width: 100% !important; height: auto !important; opacity: 1 !important; visibility: visible !important; transition: none !important; }
  /* Tables print whole: no scroll boxes around them, and cells wrap. */
  .f1gmat-print-keep :is(div, figure, section):has(table) { overflow: visible !important; max-height: none !important; }
  .f1gmat-print-keep table { display: table !important; overflow: visible !important; white-space: normal !important; width: 100% !important; max-width: 100% !important; table-layout: auto !important; }
  .f1gmat-print-keep :is(th, td) { white-space: normal !important; overflow-wrap: break-word; word-break: normal !important; }
  /* Inside the article: no ads, embeds or forms. */
  .f1gmat-print-keep :is(iframe, video, audio, object, embed, form, ins.adsbygoogle) { display: none !important; }
  /* Page breaks: a heading stays with its text; images and rows stay whole. */
  .f1gmat-print-keep :is(h1, h2, h3, h4, h5, h6) { break-after: avoid; page-break-after: avoid; }
  .f1gmat-print-keep :is(img, figure, tr) { break-inside: avoid; page-break-inside: avoid; }
  h1.f1gmat-print-keep { margin: 0 0 10pt !important; }

  .f1gmat-actions { margin: 0; }
  .f1gmat-print-source {
    display: block;
    margin: 0 0 12pt;
    padding: 0 0 4pt;
    border-bottom: 1px solid #999;
    color: #444;
    font: 9pt/1.4 Arial, sans-serif;
  }
  .f1gmat-print-box {
    display: block;
    break-inside: avoid;
    margin: 22pt 0 0;
    padding: 12pt 14pt;
    border: 1.5px solid #111;
    font: 10.5pt/1.5 Arial, sans-serif;
  }
  .f1gmat-print-box p { margin: 6pt 0 0; }
  .f1gmat-print-box p:first-child { margin-top: 0; }
  .f1gmat-print-box__sub { padding-bottom: 8pt; border-bottom: 1px solid #999; }
  .f1gmat-print-box a { color: #0e5c8a; }
}
