/* Paper cards throughout the site's existing blue-ink identity.
   Content stays in the normal flow; only the fastening is decorative. */
body main .catalog .service-index > article,
body main .journal .journal-index > article[data-astro-cid-x255k2k2] {
  position: relative;
  background-color: #eaf4f8;
  background-image:
    linear-gradient(rgba(255, 255, 255, .12), rgba(240, 248, 251, .24)),
    url('/images/brand/paper-fibre.webp');
  background-size: auto, 810px auto;
  background-position: center, left top;
  border-color: #b5cadd;
  box-shadow: 0 9px 24px rgba(24, 51, 80, .12), 0 2px 5px rgba(24, 51, 80, .06);
}

body main :is(.catalog .service-index, .journal .journal-index) > article:nth-child(even) {
  background-position: center, right bottom;
}

/* A small metallic wire clip, made as geometry rather than a new image asset. */
body main .catalog .service-index > article::after,
body main .journal .journal-index > article[data-astro-cid-x255k2k2]::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: -9px;
  right: 18px;
  width: 24px;
  height: 50px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 56' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' x2='1' y1='0' y2='.35'%3E%3Cstop stop-color='%23405a79'/%3E%3Cstop offset='.38' stop-color='%23d1e2ed'/%3E%3Cstop offset='.6' stop-color='%23536f90'/%3E%3Cstop offset='1' stop-color='%23344f70'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M17 40V9a7 7 0 0 0-14 0v35a10 10 0 0 0 20 0V14M8 42V11a2 2 0 0 1 4 0v30' stroke='url(%23m)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 40V9a7 7 0 0 0-14 0v35a10 10 0 0 0 20 0V14M8 42V11a2 2 0 0 1 4 0v30' stroke='%23f3f9fd' stroke-opacity='.72' stroke-width='.55' transform='translate(-.3 -.4)' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .8))
    drop-shadow(0 4px 4px rgba(18, 48, 78, .25));
  transform: rotate(7deg);
  transform-origin: 50% 12%;
}

body main :is(.catalog .service-index, .journal .journal-index) > article h2 {
  padding-right: 26px;
}

body:not(.home-page) main .case-studies .case-dossier[data-astro-cid-6uufqrtv],
body main :is(.opening .work-sheet, .depth .scenario-sheet,
  .responsibility .responsibility-sheet, .work-plan .signed-note,
  .case-page .results-sheet, .reading details.article-toc, .reading .reading-note) {
  background-color: #eaf4f8;
  background-image:
    linear-gradient(rgba(255, 255, 255, .18), rgba(240, 248, 251, .28)),
    url('/images/brand/paper-fibre.webp');
  background-size: auto, 810px auto;
  background-position: center, left top;
  box-shadow: 0 9px 24px rgba(24, 51, 80, .10), 0 2px 5px rgba(24, 51, 80, .04);
}

/* Existing SVG clips retain their authored position and get a clearer glint. */
body main :is(.opening .work-sheet > svg.clip, .responsibility .responsibility-sheet > svg.clip) {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .85))
    drop-shadow(0 4px 4px rgba(18, 48, 78, .28));
}

body main .faq.faq > div > details {
  background-color: #edf6fa;
  background-image:
    linear-gradient(rgba(255, 255, 255, .26), rgba(241, 248, 251, .36)),
    url('/images/brand/paper-fibre.webp');
  background-size: auto, 810px auto;
  background-position: center, left top;
}

body main .faq.faq > div > details[open] {
  border-color: #8faed0;
  box-shadow: 0 9px 24px rgba(24, 51, 80, .10);
}

@media (prefers-reduced-motion: no-preference) {
  body main :is(.catalog .service-index, .journal .journal-index) > article,
  body:not(.home-page) main .case-studies .case-dossier[data-astro-cid-6uufqrtv],
  body main .faq.faq > div > details {
    transition: border-color 260ms ease, box-shadow 320ms cubic-bezier(.23, 1, .32, 1),
      transform 320ms cubic-bezier(.23, 1, .32, 1);
  }
  body main :is(.catalog .service-index, .journal .journal-index) > article::after {
    transition: transform 320ms cubic-bezier(.23, 1, .32, 1);
  }
}

@media (hover: hover) and (pointer: fine) {
  body main :is(.catalog .service-index, .journal .journal-index) > article:hover,
  body main :is(.catalog .service-index, .journal .journal-index) > article:focus-within,
  body:not(.home-page) main .case-studies .case-dossier:hover,
  body:not(.home-page) main .case-studies .case-dossier:focus-within {
    border-color: #7b9dc4;
    box-shadow: 0 17px 34px rgba(24, 51, 80, .17), 0 4px 8px rgba(24, 51, 80, .07);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body main :is(.catalog .service-index, .journal .journal-index) > article:hover {
    transform: translateY(-4px);
  }
  body main :is(.catalog .service-index, .journal .journal-index) > article:hover::after,
  body main :is(.catalog .service-index, .journal .journal-index) > article:focus-within::after {
    transform: translateY(-2px) rotate(10deg);
  }
}

@media (max-width: 767px) {
  body main :is(.catalog .service-index, .journal .journal-index) > article::after {
    top: -7px;
    right: 15px;
    width: 21px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body main :is(.catalog .service-index, .journal .journal-index) > article,
  body main :is(.catalog .service-index, .journal .journal-index) > article::after,
  body:not(.home-page) main .case-studies .case-dossier[data-astro-cid-6uufqrtv],
  body main .faq.faq > div > details { transition: none; }
  body main .catalog .service-index > article:hover { transform: none; }
}

/* Secondary notes and questions share the same paper without changing the
   editorial rows into false interactive cards. */
body main :is(.personal-plan .author-note, .depth .marcel-note,
  .working-format .working-format-sheet, .home-faq-list .home-faq-item) {
  background-color: #eff7fa;
  background-image:
    linear-gradient(rgba(255, 255, 255, .22), rgba(240, 248, 251, .32)),
    url('/images/brand/paper-fibre.webp');
  background-size: auto, 810px auto;
  background-position: center, right bottom;
}

body main .analytics-note {
  background-color: #103985;
  background-image:
    linear-gradient(rgba(11, 48, 120, .87), rgba(13, 50, 121, .89)),
    url('/images/brand/paper-fibre.webp');
  background-size: auto, 810px auto;
}

body main .home-faq-list .home-faq-item {
  margin-bottom: 8px;
  padding-inline: clamp(16px, 1.7vw, 22px);
  border: 1px solid #bdcfe0;
}

body main .home-faq-list .home-faq-item[open] {
  background-image:
    linear-gradient(rgba(255, 255, 255, .28), rgba(241, 248, 251, .36)),
    url('/images/brand/paper-fibre.webp');
  box-shadow: 0 9px 24px rgba(24, 51, 80, .10);
}

@media (prefers-reduced-motion: no-preference) {
  body main .home-faq-list .home-faq-item,
  body main :is(.related li > a, .formats li, .work-plan .plan-list > li) {
    transition: color 220ms ease, background-color 220ms ease,
      border-color 220ms ease, box-shadow 300ms cubic-bezier(.23, 1, .32, 1);
  }
}

@media (hover: hover) and (pointer: fine) {
  body main .home-faq-list .home-faq-item:hover {
    border-color: #8faed0;
    box-shadow: 0 7px 20px rgba(24, 51, 80, .09);
  }
  body main :is(.related li > a, .formats li):hover {
    background-color: rgba(219, 235, 245, .4);
  }
}

@media (prefers-reduced-motion: reduce) {
  body main .home-faq-list .home-faq-item,
  body main :is(.related li > a, .formats li, .work-plan .plan-list > li) {
    transition: none;
  }
}
