/* Modal layer: creator, agency and platform directories, profile lists and the tools hub. */

/* hero: copy left, the short answer as a white card on the right */
@media (min-width: 1000px) {
  body.directory-page > main > .dir-head > div:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    column-gap: clamp(32px, 4vw, 56px);
    align-items: start;
  }
  body.directory-page > main > .dir-head > div:first-child > * { grid-column: 1; }
  body.directory-page > main > .dir-head > div:first-child > .dir-answer {
    grid-column: 2;
    grid-row: 1 / span 8;
    align-self: center;
  }
}
body.directory-page main .dir-head .dir-answer {
  position: relative;
  max-width: none;
  margin: 18px 0;
  padding: 46px 22px 22px;
  border-radius: 18px;
  background: #fff;
  color: var(--mk-ink-2);
  font-size: 15.5px;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgb(30 36 120 / .08), 0 24px 48px -28px rgb(30 36 120 / .5);
}
body.directory-page main .dir-head .dir-answer::before {
  content: "Short answer";
  position: absolute;
  top: 18px;
  left: 22px;
  color: var(--mk-muted-2);
  font: 500 11.5px/1 var(--mk-body);
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.directory-page main .dir-head .dir-answer::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mk-success);
  box-shadow: 0 0 0 4px var(--mk-success-soft);
}
body.directory-page main .dir-head h1 { max-width: 14ch; margin-top: 16px; }
body.directory-page main .dir-head .dir-intro { color: #2e3150; font-size: 15.5px; }
body.directory-page main .dir-head .dir-intro strong { color: var(--mk-ink); }
body.directory-page main .dir-head .dir-hero-actions { gap: 10px; margin-top: 6px; }
body.directory-page main .dir-head :is(.platform-row, .platform-chip, .dir-head-chips) span,
body.directory-page main .dir-head .platform-chip {
  background: rgb(255 255 255 / .6);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .8);
  border: 0;
  color: var(--mk-ink-2);
}

/* sections */
body.directory-page main .dir-section { padding-top: clamp(56px, 7vw, 88px); }
body.directory-page main .dir-section-head h2 { max-width: 22ch; }
body.directory-page main .dir-section-head p { max-width: 64ch; color: var(--mk-muted); }

/* filters: hairline select chips */
body.directory-page main .dir-filters {
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--mk-subtle);
  box-shadow: inset 0 0 0 1px var(--mk-line);
}
body.directory-page main .dir-filter span { color: var(--mk-muted-2); font-size: 11px; font-weight: 500; letter-spacing: .07em; }
body.directory-page main .dir-filter select {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: var(--mk-ring);
  color: var(--mk-ink);
  font-size: 13.5px;
}

/* creator table */
body.directory-page main .dir-table th[scope="row"] { font-weight: 500; }
body.directory-page main .dir-handle { gap: 10px; color: var(--mk-ink); font-weight: 500; }
body.directory-page main .dir-handle:hover .dir-handle-name { color: var(--mk-primary); }
body.directory-page main .dir-avatar { border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mk-line-2); }
body.directory-page main .dir-tag {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: var(--mk-subtle);
  box-shadow: inset 0 0 0 1px var(--mk-line);
  color: var(--mk-ink-2);
  font-size: 12.5px;
  font-weight: 500;
}
body.directory-page main a.dir-tag:hover { background: var(--mk-soft); box-shadow: inset 0 0 0 1px #d6d9fb; color: var(--mk-primary); }
body.directory-page main .dir-tag-instagram svg { color: #c02763; }
body.directory-page main .dir-tag-soft { background: var(--mk-soft); box-shadow: none; color: var(--mk-primary); }
body.directory-page main .dir-tag-muted { background: transparent; box-shadow: none; color: var(--mk-muted-2); }
body.directory-page main .dir-masked { color: var(--mk-muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
body.directory-page main .dir-row-cta {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--mk-ring);
  color: var(--mk-ink);
  font-size: 12.5px;
  font-weight: 500;
}
body.directory-page main .dir-row-cta:hover { box-shadow: 0 0 0 1px #c9ccf5; color: var(--mk-primary); }
body.directory-page main .dir-avatar-note { color: var(--mk-muted-2); font-size: 12.5px; }

/* inline unlock band under the table */
body.directory-page main .dir-more {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--mk-frame-soft);
  box-shadow: none;
}
body.directory-page main .dir-more p { color: #2e3150; }
body.directory-page main .dir-more p strong { color: var(--mk-ink); font-family: var(--mk-display); font-weight: 600; letter-spacing: -.02em; }
body.directory-page main .dir-more-icon { border: 0; border-radius: 10px; background: #fff; color: var(--mk-primary); box-shadow: var(--mk-ring); }

/* snapshot: light metric tiles */
body.directory-page main .dir-stats .metric,
body.directory-page main .dir-stats .metric:first-child {
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--mk-ring);
  color: var(--mk-ink);
}
body.directory-page main .dir-stats .metric dt,
body.directory-page main .dir-stats .metric:first-child dt { color: var(--mk-muted-2); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
body.directory-page main .dir-stats .metric dd,
body.directory-page main .dir-stats .metric:first-child dd { color: var(--mk-ink); font-family: var(--mk-display); font-weight: 600; letter-spacing: -.04em; }
body.directory-page main .dir-stats .metric:first-child { background: var(--mk-frame-soft); }
body.directory-page main :is(.dir-bands, .dir-snapshot-side > *) { border: 0; border-radius: 14px; background: #fff; box-shadow: var(--mk-ring); }
body.directory-page main .dir-band-track { border-radius: 99px; background: var(--mk-subtle); }
body.directory-page main .dir-band-fill { border-radius: 99px; background: linear-gradient(90deg, #8e98ff, var(--mk-primary)); }

/* prose sections read like an article column */
body.directory-page main .dir-prose > :is(p, ul, ol, h3) { max-width: 72ch; }
body.directory-page main .dir-prose aside,
body.directory-page main .dir-prose blockquote,
body.directory-page main .dir-prose .dir-callout {
  border: 0;
  border-radius: 14px;
  background: var(--mk-soft);
  box-shadow: none;
}

/* FAQ: heading left, questions right */
@media (min-width: 1000px) {
  body.directory-page main .dir-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 48px;
    align-items: start;
  }
  body.directory-page main .dir-faq > h2 { position: sticky; top: calc(var(--mk-header) + 32px); margin: 0; }
  body.directory-page main .dir-faq > :not(h2):not(.dir-faq-list) { grid-column: 1; }
  body.directory-page main .dir-faq > .dir-faq-list { grid-column: 2; grid-row: 1 / span 4; }
}

/* index and related links: hairline chips and cards */
body.directory-page main .dir-index-group,
body.directory-page main .dir-related-group,
body.directory-page main .dir-hub-card {
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--mk-ring);
}
body.directory-page main .dir-index-group h3,
body.directory-page main .dir-related-group h3 {
  color: var(--mk-muted-2);
  font: 500 11.5px/1.2 var(--mk-body);
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.directory-page main .dir-index-group h3 svg { color: var(--mk-primary); }
body.directory-page main .dir-index-group a,
body.directory-page main .dir-related-group a { color: var(--mk-ink-2); }
body.directory-page main .dir-index-group a:hover,
body.directory-page main .dir-related-group a:hover { color: var(--mk-primary); }
body.directory-page main .dir-index-group a[aria-current="page"] { color: var(--mk-primary); font-weight: 600; }
body.directory-page main .dir-index-group a b,
body.directory-page main .dir-related-group a b { color: var(--mk-muted-2); font-weight: 400; font-variant-numeric: tabular-nums; }
body.directory-page main .dir-index-inline a {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--mk-line-2);
  color: var(--mk-ink-2);
}
body.directory-page main .dir-index-inline a:hover { box-shadow: inset 0 0 0 1px #c9ccf5; color: var(--mk-primary); }

/* closing band after main */
body.directory-page > .case-footer,
body.tools-page > .case-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 22px;
  width: var(--mk-wrap);
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding: clamp(56px, 8vw, 88px) 24px;
  border: 0;
  border-radius: 28px;
  background: var(--mk-frame);
  color: var(--mk-ink);
  text-align: center;
}
body.directory-page > .case-footer::after,
body.tools-page > .case-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .35;
  background-image: var(--mk-dots);
  background-size: 18px 18px;
  pointer-events: none;
}
body:is(.directory-page, .tools-page) > .case-footer > div { display: grid; justify-items: center; gap: 14px; }
body:is(.directory-page, .tools-page) > .case-footer h2 {
  max-width: 18ch;
  margin: 0;
  color: var(--mk-ink);
  font-family: var(--mk-display);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
}
body:is(.directory-page, .tools-page) > .case-footer p { max-width: 36rem; margin: 0; color: #2e3150; font-size: 16px; line-height: 1.6; }
body:is(.directory-page, .tools-page) > .case-footer .btn-dark {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--mk-ink);
  color: #fff;
  font: 500 15px/1.1 var(--mk-body);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 1px 2px rgb(0 0 0 / .2);
}
body:is(.directory-page, .tools-page) > .case-footer .btn-dark:hover { background: #2a2a30; }

/* tools hub cards */
body.tools-page main .tool-card { padding: 20px; }
body.tools-page main .tool-card-icon,
body.tools-page main .group-icon { border: 0; border-radius: 9px; background: var(--mk-soft); color: var(--mk-primary); box-shadow: none; }
body.tools-page main .hub-filter { border: 0; border-radius: 14px; background: #fff; box-shadow: var(--mk-ring); }

@media (max-width: 720px) {
  body:is(.directory-page, .tools-page) > .case-footer { border-radius: 22px; }
  body.directory-page main .dir-head .dir-answer { padding: 42px 18px 18px; }
}

/* agency profiles, agency lists and alternatives, creator profiles: the first facts or
   table section rides up onto the hero frame as a white card (heroes that already carry
   the short-answer card keep their own layout) */
@media (min-width: 1000px) {
  body.directory-page > main > .dir-head:not(:has(.dir-answer)):has(+ .dir-section :is(.ag-facts, .cp-facts, .dir-table-wrap)) { padding-bottom: clamp(136px, 12vw, 168px); }
  body.directory-page > main > .dir-head:not(:has(.dir-answer)) + .dir-section:has(:is(.ag-facts, .cp-facts, .dir-table-wrap)) {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: calc(var(--mk-wrap) - 2 * var(--mk-pad));
    margin-top: clamp(-112px, -9vw, -88px);
    padding: clamp(22px, 2.4vw, 30px);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(30 36 120 / .08), 0 30px 60px -30px rgb(30 36 120 / .5);
  }
  body.directory-page > main > .dir-head:not(:has(.dir-answer)) + .dir-section:has(:is(.ag-facts, .cp-facts, .dir-table-wrap)) .dir-section-head { margin-bottom: 16px; }
}

/* tools: the working tool (or the hub's unlock band) rides up onto the hero frame */
@media (min-width: 1000px) {
  body.tools-page:not(.directory-page) > main > .tool-page-head:has(+ .tools-shell) { padding-bottom: clamp(136px, 12vw, 168px); }
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: calc(var(--mk-wrap) - 2 * var(--mk-pad));
    margin-top: clamp(-112px, -9vw, -88px);
  }
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell > :is(.tf, .irc, .db-offer),
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell.contract-tool,
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell.rates-section {
    border: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(30 36 120 / .08), 0 30px 60px -30px rgb(30 36 120 / .5);
  }
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell.contract-tool,
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell.rates-section {
    box-sizing: border-box;
    width: calc(var(--mk-wrap) - 2 * var(--mk-pad));
    padding: clamp(22px, 2.4vw, 30px);
  }
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell > .db-offer::before,
  body.tools-page:not(.directory-page) > main > .tool-page-head + .tools-shell > .db-offer::after { opacity: 0; }
}
