/*
 * Workers' Comp Success Hub membership page styles.
 *
 * Every selector is scoped under .amx so the stylesheet cannot reach the rest of the site and the
 * theme cannot reach into it. Do not add unscoped selectors.
 *
 * The palette is deliberately the scorecard's palette, sampled from assets/scorecard.css: warm
 * paper ground, near black ink, one rust accent. The two pages sit at opposite ends of the same
 * funnel and a visitor moving between them should not feel a brand change.
 */

.amx {
  --amx-ink: #12141a;
  --amx-ink2: #1b1e26;
  --amx-pap: #f7f6f3;
  --amx-white: #fdfdfd;
  --amx-txt: #1a1d24;
  --amx-mut: #545c6b;
  /* Darkened from the prototype's #8a92a2 so small uppercase labels clear WCAG AA on paper. */
  --amx-faint: #6b7382;
  --amx-acc: #a04d18;
  --amx-acc-dk: #833d10;
  --amx-acc2: #f0e2d6;
  --amx-line: #e6e3dc;
  --amx-line2: #d8d4ca;
  --amx-good: #2c6e4a;
  --amx-focus: #1f4f7a;

  background: var(--amx-pap);
  color: var(--amx-txt);
  font: 17px/1.65 "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.amx *,
.amx *::before,
.amx *::after { box-sizing: border-box; }

.amx img { max-width: 100%; height: auto; }

.amx-serif {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- visible focus, everywhere ---------- */

.amx :focus-visible {
  outline: 3px solid var(--amx-focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.amx :focus:not(:focus-visible) { outline: none; }

.amx-skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--amx-txt); padding: 12px 18px; z-index: 100;
}
.amx-skip:focus { left: 12px; top: 12px; }

/* ---------- layout ---------- */

.amx-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.amx-wrap--narrow { max-width: 720px; }

.amx-band { padding: 72px 0; }
.amx-band--paper { background: var(--amx-white); border-block: 1px solid var(--amx-line); }
.amx-band--ink { background: var(--amx-ink); color: #e9e7e2; }

.amx-band h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--amx-ink);
}
.amx-band--ink h2 { color: #fdfdfd; }

.amx-sub {
  max-width: 62ch;
  margin: 0 0 36px;
  color: var(--amx-mut);
  font-size: 18px;
}
.amx-sub--light { color: #b9b5ad; }

/* ---------- topbar ---------- */

.amx-topbar {
  background: var(--amx-white);
  border-bottom: 1px solid var(--amx-line);
  position: sticky; top: 0; z-index: 20;
}
.amx-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px;
}
.amx-brand { display: block; line-height: 0; }
.amx-brand img { width: 190px; height: auto; }
.amx-topbar-cta { display: flex; align-items: center; gap: 16px; }
.amx-topbar-price {
  color: var(--amx-mut); font-size: 15px; font-weight: 500; white-space: nowrap;
}

/* ---------- buttons ---------- */

.amx-btn {
  display: inline-block;
  background: var(--amx-acc);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  padding: 16px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 120ms ease-in-out;
}
.amx-btn:hover,
.amx-btn:focus { background: var(--amx-acc-dk); color: #fff; }

.amx-btn--ghost {
  background: transparent;
  color: var(--amx-acc);
  border: 1.5px solid var(--amx-acc);
  padding: 10px 18px;
  font-size: 15px;
}
.amx-btn--ghost:hover,
.amx-btn--ghost:focus { background: var(--amx-acc); color: #fff; }

/*
 * The closed state. Flat, quiet and obviously not pressable, rather than a greyed out button that
 * reads as something broken. It is a status message wearing the button's position.
 */
.amx-btn--closed {
  background: transparent;
  color: var(--amx-faint);
  border: 1.5px dashed var(--amx-line2);
  font-weight: 500;
  cursor: default;
}
.amx-btn--closed:hover { background: transparent; color: var(--amx-faint); }

.amx-cta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px;
  margin: 34px 0 0;
}
.amx-cta-row--center { justify-content: center; margin-top: 44px; }
.amx-cta-note { color: var(--amx-mut); font-size: 15px; }

/* ---------- hero ---------- */

.amx-hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(1100px 460px at 12% -10%, var(--amx-acc2) 0%, rgba(240,226,214,0) 62%),
    var(--amx-pap);
}
.amx-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--amx-acc);
  margin: 0 0 18px;
}
.amx-hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  margin: 0 0 26px;
  max-width: 17ch;
  color: var(--amx-ink);
}
.amx-lede {
  max-width: 60ch;
  font-size: 19px;
  color: var(--amx-mut);
  margin: 0 0 18px;
}
.amx-lede strong { color: var(--amx-txt); }

.amx-stats {
  display: flex; flex-wrap: wrap; gap: 40px;
  list-style: none; margin: 52px 0 0; padding: 34px 0 0;
  border-top: 1px solid var(--amx-line2);
}
.amx-stats li { display: flex; flex-direction: column; }
.amx-stats strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 40px; line-height: 1; color: var(--amx-ink); font-weight: 600;
}
.amx-stats span {
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 12px; font-weight: 600; color: var(--amx-faint); margin-top: 8px;
}

/* ---------- grids and cards ---------- */

.amx-grid { display: grid; gap: 26px; }
.amx-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.amx-grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }

.amx-card {
  background: var(--amx-white);
  border: 1px solid var(--amx-line);
  border-radius: 10px;
  padding: 28px 26px;
}
.amx-band--paper .amx-card { background: var(--amx-pap); }
.amx-card h3 {
  font-size: 19px; line-height: 1.3; margin: 0 0 10px; color: var(--amx-ink);
}
/*
 * `margin: 0` was safe while every card held exactly one paragraph. The scorecard partner page
 * has cards with two, and without a gap they read as one run on block. Last child keeps the
 * original flush bottom, so single paragraph cards are unchanged.
 */
.amx-card p { margin: 0 0 12px; color: var(--amx-mut); font-size: 16px; }
.amx-card p:last-child { margin-bottom: 0; }

.amx-card--area { border-top: 3px solid var(--amx-acc); }
.amx-count {
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; font-weight: 700; color: var(--amx-acc);
  margin: 0 0 8px;
}

/* ---------- check lists ---------- */

.amx-checks { list-style: none; margin: 0; padding: 0; max-width: 68ch; }
.amx-checks li {
  position: relative;
  padding: 0 0 0 34px;
  margin: 0 0 22px;
  color: var(--amx-mut);
}
.amx-checks li::before {
  content: "";
  position: absolute; left: 4px; top: 8px;
  width: 9px; height: 15px;
  border: solid var(--amx-good);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.amx-checks strong { color: var(--amx-txt); display: block; margin-bottom: 2px; }
.amx-checks--tight li { margin-bottom: 14px; }

/* The "not for" column. Same shape, a cross instead of a tick, no alarm colour. */
.amx-checks--no li::before {
  content: "";
  left: 3px; top: 10px;
  width: 13px; height: 13px;
  border: 0;
  transform: none;
  background:
    linear-gradient(to bottom right, transparent 44%, var(--amx-faint) 44%, var(--amx-faint) 56%, transparent 56%),
    linear-gradient(to bottom left,  transparent 44%, var(--amx-faint) 44%, var(--amx-faint) 56%, transparent 56%);
}

/* ---------- the full playbook list ---------- */

.amx-list {
  columns: 2; column-gap: 44px;
  margin: 0; padding: 0 0 0 22px;
  color: #cfcbc4;
  font-size: 15.5px;
}
.amx-list li {
  break-inside: avoid;
  margin: 0 0 13px;
  padding-left: 4px;
}
.amx-list li::marker { color: var(--amx-acc); font-variant-numeric: tabular-nums; }

/* ---------- Diagnose, Install, Sustain ---------- */

.amx-steps {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 8px 0 0;
}
.amx-step {
  position: relative;
  background: var(--amx-pap);
  border: 1px solid var(--amx-line);
  border-radius: 10px;
  padding: 26px 24px;
  color: var(--amx-mut);
  font-size: 16px;
}
.amx-step p { margin: 0 0 10px; }
.amx-step p:last-child { margin-bottom: 0; }
.amx-step-n {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 22px; font-weight: 600; color: var(--amx-ink);
}
.amx-step--here { border-color: var(--amx-acc); background: var(--amx-acc2); }
.amx-here-tag {
  display: inline-block;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; font-weight: 700; color: var(--amx-acc);
  margin-top: 4px;
}
.amx-note {
  max-width: 66ch; margin: 30px 0 0;
  color: var(--amx-mut); font-size: 16px;
}

/* ---------- pricing card ---------- */

.amx-price {
  background: var(--amx-pap);
  border: 1px solid var(--amx-line2);
  border-top: 4px solid var(--amx-acc);
  border-radius: 12px;
  padding: 40px 36px;
  text-align: center;
}
.amx-price-amt {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 62px; line-height: 1; font-weight: 600;
  color: var(--amx-ink);
  margin: 0 0 26px;
}
.amx-price-amt span {
  display: block;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amx-faint);
  margin-top: 12px;
}
.amx-price-list {
  list-style: none; margin: 0 0 32px; padding: 0;
  border-top: 1px solid var(--amx-line2);
}
.amx-price-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--amx-line2);
  color: var(--amx-mut);
  font-size: 16px;
}
.amx-price-note {
  margin: 22px 0 0; color: var(--amx-faint); font-size: 14px;
  max-width: 46ch; margin-inline: auto;
}

/* ---------- faq ---------- */

.amx-faq { border-top: 1px solid var(--amx-line); padding: 24px 0; }
.amx-faq h3 { font-size: 18px; margin: 0 0 8px; color: var(--amx-ink); }
.amx-faq p { margin: 0; color: var(--amx-mut); }

/* ---------- footer ---------- */

.amx-footer {
  background: var(--amx-ink);
  color: #8f8b83;
  padding: 34px 0;
  font-size: 14px;
}
.amx-footer p { margin: 0; }
.amx-footer a { color: #c6c2ba; }

/* ---------- narrow screens ---------- */

@media (max-width: 720px) {
  .amx-band { padding: 54px 0; }
  .amx-hero { padding: 56px 0 52px; }
  .amx-topbar-price { display: none; }
  .amx-brand img { width: 150px; }
  .amx-stats { gap: 28px 36px; margin-top: 40px; }
  .amx-list { columns: 1; }
  .amx-price { padding: 32px 22px; }
  .amx-btn { width: 100%; text-align: center; }
  .amx-btn--ghost { width: auto; }
  .amx-cta-row { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .amx * { transition: none !important; animation: none !important; }
}

/* ---------- the toolbox cover grid, free library page ---------- */

/*
 * The covers are the argument on this page, so they get real size rather than thumbnail size.
 * A visitor should be able to read the headline off a cover without opening anything, which is
 * what makes 23 free playbooks feel like a shelf instead of a list of filenames.
 */

.amx-shelf { margin: 0 0 56px; }
.amx-shelf:last-of-type { margin-bottom: 8px; }

.amx-shelf-name {
  font-size: 23px;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--amx-ink);
}
.amx-shelf-blurb {
  max-width: 66ch;
  margin: 0 0 26px;
  color: var(--amx-mut);
  font-size: 16px;
}

.amx-covers {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}

.amx-cover { margin: 0; }

/*
 * The ratio is the images' own, measured rather than assumed: every one of the 23 GroupApp
 * thumbnails is exactly 1035 by 765, which is LANDSCAPE. An earlier version of this rule assumed
 * a portrait 8.5 by 11 page and cropped each flyer to a thin strip of its own top margin, which
 * rendered as 23 blank boxes. Matching the real ratio means object-fit never has to crop.
 */
.amx-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1035 / 765;
  object-fit: cover;
  background: var(--amx-white);
  border: 1px solid var(--amx-line2);
  border-radius: 6px;
}

.amx-cover figcaption { display: block; padding: 12px 2px 0; }

.amx-cover-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--amx-txt);
}
.amx-cover-blurb {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--amx-faint);
}

@media (max-width: 720px) {
  .amx-covers { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
  .amx-cover-blurb { display: none; }
  .amx-shelf { margin-bottom: 40px; }
}

/* ---------- scorecard sample screenshot ---------- */

/*
 * The generated sample result on the two scorecard landing pages.
 *
 * Capped by height rather than width. The image is a tall portrait screenshot, 1520 by 1837, and
 * a width based rule renders it a metre high on a desktop, pushing the section below it off the
 * fold and burying the call to action. Height capping keeps it to something a reader takes in at
 * a glance, which is all a sample has to do.
 *
 * `width: auto` alongside the intrinsic width and height attributes on the tag: the attributes
 * are there to reserve layout space and stop the page reflowing when a lazy image arrives, and
 * without the auto they would win and squash the aspect ratio.
 */
/*
 * Column, not row. `.amx-sample` is a <figure> and its <figcaption> is a flex item too, so a row
 * direction parks the caption in the empty space beside the screenshot, vertically centred and
 * reading as an unrelated stray sentence. Column puts it where a caption belongs.
 */
.amx-sample {
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.amx-sample figcaption { margin: 14px 0 0; text-align: center; }

.amx-sample img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 900px;
  height: auto;
  border: 1px solid var(--amx-line2);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}

@media (max-width: 720px) {
  /*
   * On a phone the height cap would shrink an already dense screenshot to unreadable. Let width
   * govern instead and accept the tall result: a reader who has scrolled this far on a phone is
   * scrolling anyway.
   */
  .amx-sample img { max-height: none; width: 100%; }
}

/* ---------- prose links ---------- */

/*
 * Inline links inside body copy.
 *
 * Without this they render as unstyled browser blue with a default underline, which is what the
 * Resource Library page has been doing since it launched on its one link out to the paid page.
 * Scoped to the four prose classes rather than to `.amx a`, because `.amx-btn` is an anchor
 * whenever its destination is configured, and a blanket rule would repaint every button on all
 * four pages.
 */
.amx-note a,
.amx-faq a,
.amx-sub a,
.amx-lede a {
  color: var(--amx-acc-dk);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.amx-note a:hover,
.amx-faq a:hover,
.amx-sub a:hover,
.amx-lede a:hover {
  color: var(--amx-ink);
}

/* ---------- scorecard clinic page: weights, script, numbered list ---------- */

/*
 * A stat tile whose value is a word rather than a number.
 *
 * `.amx-stats strong` is 40px serif, which is right for "12" and far too wide for "INSTANT": it
 * blows the four tile row onto two lines at desktop. Dropping the size keeps the optical weight of
 * the row roughly even, which is what the eye is actually reading here, not the point size.
 */
.amx-stats .amx-stat-word strong { font-size: 24px; line-height: 1.35; letter-spacing: 0.01em; }

/* The six scored areas, each carrying its weight. Same card as .amx-card--area, plus the badge. */
.amx-weight-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--amx-acc2);
  color: var(--amx-acc-dk);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/*
 * The "and you are not the one who raised it" line under the six areas.
 *
 * Deliberately not a card. It is a single sentence doing the work of the whole section, and
 * putting it in a box would rank it alongside the six items it is drawing a conclusion about.
 */
.amx-callout {
  margin: 34px 0 0;
  padding: 20px 24px;
  border-left: 3px solid var(--amx-acc);
  background: var(--amx-pap);
  font-size: 18px;
  line-height: 1.5;
  color: var(--amx-ink);
}

.amx-numlist {
  margin: 26px 0 0;
  padding: 0 0 0 22px;
  max-width: 68ch;
  color: var(--amx-mut);
  font-size: 16.5px;
}
.amx-numlist li { margin: 0 0 12px; padding-left: 6px; }
.amx-numlist li::marker { color: var(--amx-acc); font-weight: 700; font-variant-numeric: tabular-nums; }

/*
 * The block addressed to the person who actually runs the assessment, rather than the person who
 * decides to adopt it.
 *
 * Tinted with the existing accent wash rather than a new colour, so it reads as a different
 * addressee without introducing a second accent to the design system.
 */
.amx-aside {
  margin: 8px 0 0;
  padding: 34px 32px;
  border: 1px solid var(--amx-line2);
  border-radius: 12px;
  background: var(--amx-acc2);
}
.amx-aside h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  color: var(--amx-ink);
}
.amx-aside h3:first-of-type { margin-top: 18px; }
.amx-aside p { max-width: 68ch; color: #4a4136; }

/* The near verbatim opener a rep can read out. A quote, so it is obviously speech. */
.amx-script {
  margin: 16px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--amx-acc);
  background: rgba(255, 255, 255, 0.62);
  border-radius: 0 8px 8px 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--amx-ink);
}
.amx-script p { margin: 0; max-width: none; color: inherit; }

/* Secondary text link sitting beside a primary button in a cta row. */
.amx-cta-link {
  color: var(--amx-acc-dk);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.amx-cta-link:hover { color: var(--amx-ink); }

@media (max-width: 720px) {
  .amx-aside { padding: 26px 20px; }
  .amx-script { font-size: 16.5px; padding: 14px 16px; }
  .amx-callout { font-size: 16.5px; padding: 16px 18px; }
}

/*
 * `.amx-cta-note` as a block, not as the span inside `.amx-cta-row` it was written for.
 *
 * The clinic hero puts its microcopy on its own line under the button row, because that sentence
 * carries three separate facts and reads badly squeezed beside a button.
 */
p.amx-cta-note { margin: 12px 0 0; max-width: 68ch; }

/* A subheading inside a band, below a group rather than opening one. */
.amx-subhead {
  margin: 44px 0 10px;
  font-size: 22px;
  color: var(--amx-ink);
}

/*
 * Exactly two columns at desktop, for the four card "where it fits" sections.
 *
 * `.amx-grid--2` is auto-fit minmax(300px, 1fr), which happens to yield two columns when a section
 * has two cards and THREE when it has four, orphaning the fourth on a row of its own. Naming it
 * --2 hid that: the modifier describes the intended look, not the behaviour, and the behaviour
 * depends on how many children you give it. This one is explicit.
 */
.amx-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }

@media (max-width: 720px) {
  .amx-grid--pair { grid-template-columns: minmax(0, 1fr); }
}

/*
 * The "what this means for you" line closing each scored area card.
 *
 * Set apart from the neutral description above it by a rule and the accent ink, because the two
 * sentences do different jobs: the first says what the instrument asks, the second says why a
 * clinic should care. Run together in one colour they read as one paragraph and the second half
 * stops landing, which is the whole reason the section was rewritten.
 */
/*
 * Selector is `.amx-card p.amx-foryou`, not `.amx-foryou`.
 *
 * `.amx-card p` sets colour and margin at specificity (0,1,1), which beats a bare class at
 * (0,1,0). The first version of this rule lost both and shipped: the border drew, because nothing
 * competed for it, so the separation looked right while the accent colour silently did not apply.
 * A rule that half works is the hardest kind to notice.
 */
.amx-card p.amx-foryou {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--amx-line);
  color: var(--amx-acc-dk);
  font-weight: 500;
}
