/* Public tool page polish
 *
 * Loaded after public-soft-depth.css by the React shell and the server-rendered
 * public shell, so the signed-out tool pages and /tools/nexus share one layer.
 * It carries the homepage presentation rules: Montserrat headings, a strong blue
 * light behind product frames, large captures, pointer-follow card light, and
 * motion that runs once and is off under prefers-reduced-motion.
 * No colored edge stripes, no dot grids, no decorative separator lines.
 */

html body :is(.refined-public-tool, .public-tool-design) .approved-copy {
  --tp-heading: "Montserrat Variable", "Montserrat", system-ui, sans-serif;
  --tp-body: "Public Sans Variable", "Public Sans", system-ui, sans-serif;
  --tp-glow: #6f9bd6;
  --tp-glow-strength: .5;
  --tp-spot: #5f86b83d;
  --tp-ease: cubic-bezier(.22, 1, .36, 1);
  font-family: var(--tp-body);
  overflow-x: clip;
}
html.dark body :is(.refined-public-tool, .public-tool-design) .approved-copy {
  --tp-glow: #7fb0f0;
  --tp-glow-strength: .55;
  --tp-spot: #5f86b855;
}

/* Type: the homepage scale and faces. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy h1 {
  max-width: 1080px;
  font: 800 clamp(40px, 4.8vw, 76px)/1.06 var(--tp-heading);
  letter-spacing: -.044em;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy h2 {
  font: 650 clamp(30px, 3.3vw, 48px)/1.12 var(--tp-heading);
  letter-spacing: -.045em;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy h3 {
  font: 650 22px/1.3 var(--tp-heading);
  letter-spacing: -.03em;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(p, li, summary, .copy-lead, .copy-hero > .copy-wrap > p, .copy-crumbs, .copy-member-badge, .copy-action, .copy-tabs button) {
  font-family: var(--tp-body);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-lead {
  max-width: 800px;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.7;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-section, .copy-questions) {
  padding-block: clamp(72px, 8vw, 112px);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-hero {
  padding-block: clamp(48px, 6vw, 88px) 40px;
}

/* Primary action: lifts on hover and nudges its arrow, as on the homepage. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-action {
  min-height: 54px;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 650;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-action svg {
  transition: transform .2s;
}
@media (hover: hover) {
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-action:hover {
    transform: translateY(-2px);
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-action:hover svg {
    transform: translateX(4px);
  }
}

/* Product frames: one strong blue light behind the capture, allowed to spill past the frame. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-product-frame, .product-capture),
html body .refined-public-tool .approved-copy .ps-hero-tool {
  position: relative;
  isolation: isolate;
  border-radius: 14px;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-product-frame, .product-capture)::before,
html body .refined-public-tool .approved-copy .ps-hero-tool::before {
  content: "";
  position: absolute;
  inset: 20% -4% -7%;
  z-index: -1;
  border-radius: 80px;
  background: var(--tp-glow);
  filter: blur(70px);
  opacity: var(--tp-glow-strength);
  pointer-events: none;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-product-frame, .product-capture) img {
  position: relative;
  border-radius: 9px;
}
/* The capture under the hero runs wider than the text column so the interface stays readable. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-wrap > .product-capture {
  width: min(1320px, calc(100vw - clamp(32px, 6vw, 96px)));
  max-width: none;
  margin: 8px 0 clamp(56px, 7vw, 96px) 50%;
  transform: translateX(-50%);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-wrap > .product-capture img {
  max-width: none;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-product-layout {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
}

html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-product-layout, .copy-proof-layout) h2 {
  font-size: clamp(28px, 2.7vw, 40px);
}

/* Cards: neutral surface, one headline each, light that follows the pointer. No edge stripes. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-feature-grid {
  gap: 18px;
  margin-top: 44px;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-feature, .copy-proof-card, .copy-document-card, .tool-review-card) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--public-hairline);
  border-radius: 14px;
  background: var(--public-canvas);
  box-shadow: none;
  transition: border-color .25s, transform .25s;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-feature {
  padding: 30px 28px 28px;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-document-card, .copy-proof-card) {
  padding: clamp(24px, 3vw, 36px);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-document-card {
  border-top-width: 1px;
  border-top-color: var(--public-hairline);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-sample {
  border: 1px solid var(--public-hairline);
  border-radius: 14px;
  background: var(--public-panel);
  padding: 28px;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-feature, .copy-proof-card, .copy-document-card, .tool-review-card)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--spot-x, 50%) var(--spot-y, 50%), var(--tp-spot), transparent 65%);
}
@media (hover: hover) {
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-feature, .copy-proof-card, .copy-document-card, .tool-review-card):hover::before {
    opacity: 1;
  }
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-feature-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 22px;
  color: var(--public-blue-ink);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-feature h3 {
  margin: 0 0 12px;
}

/* Document tabs: neutral sliding pill (the pill element is rendered by the React page). */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-tabs[data-pill] {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--public-hairline);
  border-radius: 12px;
  background: var(--public-panel);
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-tabs[data-pill] button,
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-tabs[data-pill] button[aria-selected="true"] {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--public-muted);
  font-size: 15px;
  font-weight: 650;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-tabs[data-pill] button:is(:hover, [aria-selected="true"]) {
  color: var(--public-ink);
  background: transparent;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .tp-tab-pill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--public-hairline);
  border-radius: 8px;
  background: var(--public-canvas);
  box-shadow: 0 6px 18px #0002;
}

/* Closing call to action: a soft blue light under the button instead of a flat band. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-closing :is(h2, p) {
  margin-inline: auto;
}
html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-closing::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -220px;
  z-index: -1;
  width: min(760px, 90%);
  height: 360px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--tp-glow);
  filter: blur(90px);
  opacity: calc(var(--tp-glow-strength) * .7);
  pointer-events: none;
}

/* Questions: answers ease in when opened. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy summary {
  transition: color .2s, transform .2s;
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero sharpens from a blur once on first paint; text stays in the document for crawlers and tests. */
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-hero h1 {
    animation: tp-sharpen .8s var(--tp-ease) both;
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-hero :is(.copy-lead, .copy-hero-actions, .copy-entry-options, .ps-hero-tool) {
    animation: tp-rise .7s var(--tp-ease) .12s both;
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-hero .copy-hero-actions {
    animation-delay: .22s;
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-wrap > .product-capture {
    animation: tp-rise-centered .9s var(--tp-ease) .3s both;
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy details[open] > :not(summary) {
    animation: tp-rise .35s var(--tp-ease);
  }
  @media (hover: hover) {
    html body :is(.refined-public-tool, .public-tool-design) .approved-copy summary:hover {
      transform: translateX(3px);
    }
  }
  /* Run-once reveals. The class is only ever added by public-tool-motion.mjs. */
  html body .approved-copy .tp-reveal {
    opacity: 0;
    transform: translateY(18px);
  }
  html body .approved-copy .tp-reveal.tp-in {
    opacity: 1;
    transform: none;
    transition: opacity .6s var(--tp-ease) var(--tp-delay, 0ms), transform .6s var(--tp-ease) var(--tp-delay, 0ms);
  }
}
@keyframes tp-sharpen { from { opacity: 0; transform: translateY(14px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes tp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tp-rise-centered { from { opacity: 0; transform: translate(-50%, 22px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-product-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy h1 {
    font-size: clamp(36px, 10vw, 46px);
    letter-spacing: -.04em;
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-product-frame, .product-capture)::before {
    inset: 25% 0 -5%;
    filter: blur(44px);
  }
  html body :is(.refined-public-tool, .public-tool-design) .approved-copy .copy-feature {
    padding: 24px 22px;
  }
}

/* Sitewide footer social links: bare glyphs on one line (first built for the homepage). */
[data-testid=daylight-site-footer] :is(div:has(> [data-testid=link-twitter]), .footer-social) { flex-wrap: nowrap !important; gap: 20px !important; align-items: center; }
[data-testid=daylight-site-footer] a[data-testid^=link-]:has(> svg) { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 4px !important; border-radius: 6px !important; width: auto !important; height: auto !important; color: #5a636d !important; transition: transform .2s, color .2s; }
[data-testid=daylight-site-footer] a[data-testid^=link-]:has(> svg):hover { transform: translateY(-3px) !important; background: transparent !important; color: #0b0f14 !important; }
html.dark [data-testid=daylight-site-footer] a[data-testid^=link-]:has(> svg) { color: #aebdca !important; }
html.dark [data-testid=daylight-site-footer] a[data-testid^=link-]:has(> svg):hover { color: #fff !important; }
[data-testid=daylight-site-footer] a[data-testid^=link-]:has(> svg) svg { width: 21px !important; height: 21px !important; }

/* Demo headings inside the pages follow the same heading face. */
html body .refined-public-tool .approved-copy .public-evidence-story :is(.story-heading, .story-finding-title) {
  font-family: var(--tp-heading);
  font-weight: 650;
  letter-spacing: -.035em;
}
/* Section bands already alternate; hairlines between them only add clutter. */
html body :is(.refined-public-tool, .public-tool-design) .approved-copy :is(.copy-section, .copy-questions, .tool-reviews) {
  border-block: 0;
}

/* Claim Readiness Review keeps its own hero with the upload card; it takes the same headline face and a themed card. */
html body main[data-tool-sales-layout] h1.tp-hero-title {
  max-width: 640px;
  font: 800 clamp(38px, 4.4vw, 66px)/1.06 "Montserrat Variable", "Montserrat", system-ui, sans-serif;
  letter-spacing: -.044em;
}
html.dark body main[data-tool-sales-layout] .tp-hero-card {
  background: #151719;
  border-color: #2b2f34;
}
@media (prefers-reduced-motion: no-preference) {
  html body main[data-tool-sales-layout] h1.tp-hero-title { animation: tp-sharpen .8s cubic-bezier(.22, 1, .36, 1) both; }
  html body main[data-tool-sales-layout] .tp-hero-card { animation: tp-rise .7s cubic-bezier(.22, 1, .36, 1) .15s both; }
}
