:root {
  font-family:
    system-ui,
    -apple-system,
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;
  color: #18213d;
  background: #f6f7fb;
  font-synthesis: none;
}
body[data-page="directory"] {
  --directory-gutter: var(--space-gutter);
}
body[data-page="directory"] > main {
  max-width: none;
  padding-inline: var(--directory-gutter);
}
body[data-page="directory"] > footer.site-footer {
  max-width: none;
  width: calc(100% - 2 * var(--directory-gutter));
  padding-inline: 0;
}
main {
  padding-top: 24px;
}
.section-heading h1 {
  font-size: 20px;
  letter-spacing: normal;
  margin: 0;
}
.tool-reading {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #59627b;
}
.tool-illustration {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 24/11;
  object-fit: contain;
  margin: 0 0 24px;
  border-radius: 3px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
header,
main,
footer {
  max-width: 1100px;
  margin: auto;
  padding-left: 32px;
  padding-right: 32px;
}
header {
  padding-top: 32px;
  padding-bottom: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}
.brand > span:not(.site-name) {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: #59627b;
}
.intro {
  padding: 16px 0 26px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: #5043b8;
}
h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.35;
  margin: 8px 0 12px;
}
p {
  font-size: 16px;
  line-height: 1.85;
}
.intro > p:last-child {
  color: #59627b;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
h2 {
  font-size: 20px;
  margin: 0;
}
.section-heading span {
  font-size: 14px;
  color: #59627b;
}
.tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.tool {
  background: white;
  border: 1px solid #dce0eb;
  border-radius: 3px;
  padding: 30px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
.tool:hover {
  border-color: #6e63cc;
  box-shadow: none;
}
.tool:focus-visible,
.brand:focus-visible {
  outline: 3px solid #5043b8;
  outline-offset: 5px;
}
.category {
  font-size: 13px;
  color: #5043b8;
  font-weight: 650;
}
.tool h2 {
  font-size: 30px;
  letter-spacing: -0.035em;
  margin: 20px 0 10px;
}
.tool p {
  color: #59627b;
  margin: 0 0 28px;
}
.open {
  margin-top: auto;
  font-size: 15px;
  font-weight: 650;
  color: #4535ad;
}
.open span {
  margin-left: 10px;
}
footer {
  padding-top: 42px;
  padding-bottom: 32px;
  font-size: 14px;
  color: #59627b;
}
@media (max-width: 640px) {
  header,
  main,
  footer {
    padding-left: 22px;
    padding-right: 22px;
  }
  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .intro {
    padding-top: 28px;
    padding-bottom: 32px;
  }
  .tools {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .tool {
    padding: 26px;
    min-height: 260px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tool {
    transition: none;
  }
}

.favorites-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #dce1e8;
}
.favorites-section p {
  font-size: 12px;
  color: #606c80;
  margin-bottom: 0;
}
.favorites-content {
  display: grid;
  align-items: center;
  min-height: 58px;
  margin-top: 16px;
}
.favorites-content > * {
  grid-area: 1/1;
}
.favorites-content #favorites-empty {
  margin: 0;
}
.favorite-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.favorite-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dce1e8;
  border-radius: 3px;
  max-width: 100%;
}
.favorite-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.favorite-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.favorite-links:empty {
  margin: 0;
}
.tool {
  position: relative;
}
.tool-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
}
.tool .tool-heading h2 {
  margin: 0;
}
/* Each tool's logo sits before its name on the card and in the favourites. */
.tool h2,
.favorite-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.favorite-links a {
  gap: 8px;
}
.tool-logo {
  flex: none;
}
.tool-link {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.tool-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
}
.tool-heading > .favorite-button {
  position: relative;
  z-index: 1;
  flex: none;
}
.tool > .tool-reading {
  margin-bottom: 12px;
}
.tool-link:focus-visible {
  outline: none;
}
.tool-link:focus-visible::after,
.favorite-links a:focus-visible {
  outline: 3px solid #5043b8;
  outline-offset: 5px;
}

@media (min-width: 960px) {
  main {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .favorites-section {
    position: sticky;
    top: 24px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 0 24px 24px 0;
    margin: 0;
    border-bottom: 0;
    border-right: 1px solid #dce1e8;
  }
  .favorites-section h2 {
    font-size: 16px;
    line-height: 27px;
  }
  .favorites-content {
    align-items: start;
  }
  .favorite-links {
    flex-direction: column;
    gap: 8px;
  }
  .favorite-links li {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 8px;
  }
  .favorite-links a {
    flex: 1;
    min-width: 0;
  }
  .tools-section {
    min-width: 0;
  }
  .tools {
    gap: 16px;
  }
  .tool {
    padding: 18px;
    min-height: 0;
  }
  .tool-illustration {
    margin-bottom: 18px;
  }
  .tool h2 {
    font-size: 26px;
  }
  .tool-heading {
    margin-top: 12px;
  }
  .tool p {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 20px;
  }
  .open {
    font-size: 14px;
  }
}
@media (min-width: 1280px) {
  .tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Narrow screens: keep the favorites row short and use the compact card
   sizes from the desktop layout, so more than one tool fits on screen. */
@media (max-width: 959px) {
  .favorites-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .favorites-section h2 {
    font-size: 16px;
    line-height: 27px;
  }
  .favorites-content {
    margin-top: 8px;
  }
  /* The favorites section appears once something is saved; the ☆ on each card explains itself. */
  .favorites-section.is-empty:not(.was-filled):not(:has(#favorites-status:not([hidden]))) {
    display: none;
  }
  .tool-reading {
    display: none;
  }
  .tool-illustration {
    height: 96px;
    aspect-ratio: auto;
    margin-bottom: 12px;
  }
  .tool {
    padding: 20px;
    min-height: 0;
  }
  .tool-illustration {
    margin-bottom: 14px;
  }
  .tool h2 {
    font-size: 24px;
  }
  .tool-heading {
    margin-top: 12px;
  }
  .tool p {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 16px;
  }
  .open {
    font-size: 14px;
  }
}

/* Each card and favourite takes its tool's accent (UI-STYLE), so the category, "open", the
   hover frame and a pressed star lead into the colour of the page they open. */
:is(.tool[data-slug="crosszip"], [data-favorite-item="crosszip"]) {
  --ui-accent: #245de8;
}
:is(.tool[data-slug="roughpad"], [data-favorite-item="roughpad"]) {
  --ui-accent: #344bc5;
}
:is(.tool[data-slug="marklet"], [data-favorite-item="marklet"]) {
  --ui-accent: #426448;
}
:is(.tool[data-slug="murmur"], [data-favorite-item="murmur"]) {
  --ui-accent: #326958;
}
:is(.tool[data-slug="cutout"], [data-favorite-item="cutout"]) {
  --ui-accent: #665397;
}
:is(.tool[data-slug="qraft"], [data-favorite-item="qraft"]) {
  --ui-accent: #286354;
}
:is(.tool[data-slug="pixlet"], [data-favorite-item="pixlet"]) {
  --ui-accent: #bb512f;
}
:is(.tool[data-slug="fontscope"], [data-favorite-item="fontscope"]) {
  --ui-accent: #c81e63;
}
body[data-page="directory"] .tool:hover {
  border-color: var(--ui-accent);
}
body[data-page="directory"] .tool-link:focus-visible::after,
body[data-page="directory"] .favorite-links a:focus-visible {
  outline-color: var(--ui-accent);
}

/* A newly saved tool lights up once in the favourites in its colour, and its star pops. */
.favorite-links li.is-arriving {
  animation: favorite-arrive 1.2s ease-out;
}
@keyframes favorite-arrive {
  from {
    border-color: var(--ui-accent);
    background: color-mix(in srgb, var(--ui-accent) 16%, #fff);
  }
  to {
    border-color: #dce1e8;
    background: #fff;
  }
}
.favorite-button.is-popping span {
  display: inline-block;
  animation: star-pop 0.35s ease-out;
}
@keyframes star-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .favorite-links li.is-arriving,
  .favorite-button.is-popping span {
    animation: none;
  }
}

/* The illustration is inline SVG (or an image if it could not be read), filling its frame. */
.tool-illustration {
  overflow: hidden;
}
.tool-illustration > :is(svg, img) {
  display: block;
  width: 100%;
  height: 100%;
}

/* Pointing at (or focusing) a card plays its picture once, showing what the tool does in the
   same motion as its screen. The still picture is the finished state. */
.art * {
  transform-box: fill-box;
}
.tool:is(:hover, :focus-within) .art :is([class^="a-"], [class*=" a-"]) {
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}
/* CrossZip: a file travels from the Mac through the ZIP and arrives ready on Windows. */
.tool:is(:hover, :focus-within) .art-crosszip .a-doc {
  animation-name: cz-travel;
  animation-duration: 1.8s;
  animation-timing-function: ease-in-out;
}
@keyframes cz-travel {
  0% {
    opacity: 1;
    transform: translate(0, 0);
  }
  38% {
    opacity: 1;
    transform: translate(137px, 8px) scale(0.85);
  }
  48% {
    opacity: 1;
    transform: translate(137px, 8px) scale(0.85);
  }
  86% {
    opacity: 1;
    transform: translate(284px, 4px);
  }
  100% {
    opacity: 0;
    transform: translate(284px, 4px);
  }
}
.tool:is(:hover, :focus-within) .art-crosszip .a-zip {
  animation-name: cz-squeeze;
  animation-delay: 0.6s;
  animation-duration: 0.35s;
}
@keyframes cz-squeeze {
  50% {
    transform: scale(0.9, 1.06);
  }
}
.tool:is(:hover, :focus-within) .art-crosszip .a-check {
  animation-name: art-pop;
  animation-delay: 1.55s;
  animation-duration: 0.4s;
}
@keyframes art-pop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  70% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
/* Roughpad: the sketch draws line by line, then goes to AI. */
.tool:is(:hover, :focus-within) .art-roughpad .a-draw {
  stroke-dasharray: 1;
  animation-name: art-draw;
  animation-delay: calc(var(--i) * 0.28s);
  animation-duration: 0.45s;
}
@keyframes art-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.tool:is(:hover, :focus-within) .art-roughpad .a-pencil {
  animation-name: rp-pencil;
  animation-duration: 1.3s;
}
@keyframes rp-pencil {
  0% {
    transform: translate(-150px, -118px);
  }
  30% {
    transform: translate(-60px, -92px);
  }
  60% {
    transform: translate(-90px, -40px);
  }
  100% {
    transform: translate(0, 0);
  }
}
.tool:is(:hover, :focus-within) .art-roughpad :is(.a-arrow, .a-bubble) {
  animation-name: art-arrive;
  animation-delay: 1.25s;
  animation-duration: 0.45s;
}
@keyframes art-arrive {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* Marklet: a frame, an arrow and a note land on the photo. */
.tool:is(:hover, :focus-within) .art-marklet :is(.a-mark, .a-point) {
  stroke-dasharray: 1;
  animation-name: art-draw;
  animation-duration: 0.5s;
}
.tool:is(:hover, :focus-within) .art-marklet .a-point {
  animation-delay: 0.85s;
  animation-duration: 0.45s;
}
.tool:is(:hover, :focus-within) .art-marklet .a-point-head {
  animation-name: art-fade;
  animation-delay: 1.25s;
  animation-duration: 0.2s;
}
@keyframes art-fade {
  from {
    opacity: 0;
  }
}
.tool:is(:hover, :focus-within) .art-marklet .a-note {
  transform-origin: left center;
  animation-name: art-pop;
  animation-delay: 0.45s;
  animation-duration: 0.4s;
}
/* Murmur: the waveform fills from the left as the words are written. */
.tool:is(:hover, :focus-within) .art-murmur .a-bar {
  animation-name: mm-bar;
  animation-delay: calc(var(--i) * 0.09s);
  animation-duration: 0.5s;
}
@keyframes mm-bar {
  0% {
    stroke: #c3d5ce;
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.25);
  }
  100% {
    transform: scaleY(1);
  }
}
.tool:is(:hover, :focus-within) .art-murmur .a-words {
  animation-name: art-arrive;
  animation-delay: 0.7s;
}
.tool:is(:hover, :focus-within) .art-murmur .a-line {
  transform-origin: left center;
  animation-name: art-grow;
  animation-delay: calc(0.95s + var(--i) * 0.22s);
  animation-duration: 0.4s;
}
@keyframes art-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
/* Cutout: a cut line sweeps across and the background falls away, as on its screen. */
.tool:is(:hover, :focus-within) .art-cutout .a-scene {
  animation-name: co-reveal;
  animation-duration: 1.5s;
  animation-timing-function: ease-in-out;
}
@keyframes co-reveal {
  0%,
  25% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  95% {
    opacity: 1;
    clip-path: inset(0 0 0 100%);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
}
.tool:is(:hover, :focus-within) .art-cutout .a-cut {
  animation-name: co-cut;
  animation-duration: 1.5s;
  animation-timing-function: ease-in-out;
}
@keyframes co-cut {
  0%,
  25% {
    opacity: 1;
    transform: translateX(0);
  }
  95% {
    opacity: 1;
    transform: translateX(160px);
  }
  100% {
    opacity: 0;
    transform: translateX(160px);
  }
}
/* Qraft: the URL is typed, then the code prints from the top under a scan line. */
.tool:is(:hover, :focus-within) .art-qraft .a-url-cover {
  transform-origin: right center;
  animation-name: qr-uncover-x;
  animation-duration: 0.6s;
  animation-timing-function: steps(9, end);
}
@keyframes qr-uncover-x {
  from {
    opacity: 1;
    transform: scaleX(1);
  }
  to {
    opacity: 1;
    transform: scaleX(0);
  }
}
.tool:is(:hover, :focus-within) .art-qraft .a-code-cover {
  transform-origin: center bottom;
  animation-name: qr-uncover-y;
  animation-delay: 0.75s;
  animation-duration: 0.8s;
  animation-timing-function: linear;
}
@keyframes qr-uncover-y {
  from {
    opacity: 1;
    transform: scaleY(1);
  }
  to {
    opacity: 1;
    transform: scaleY(0);
  }
}
.tool:is(:hover, :focus-within) .art-qraft .a-scan {
  animation-name: qr-scan;
  animation-delay: 0.75s;
  animation-duration: 0.8s;
  animation-timing-function: linear;
}
@keyframes qr-scan {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  95% {
    opacity: 1;
    transform: translateY(100px);
  }
  to {
    opacity: 0;
    transform: translateY(100px);
  }
}
/* Pixlet: the size meter shrinks to the lighter result, as on its screen. */
.tool:is(:hover, :focus-within) .art-pixlet .a-meter {
  animation-name: px-shrink;
  animation-delay: 0.25s;
  animation-duration: 0.8s;
}
@keyframes px-shrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0.17);
  }
}
.tool:is(:hover, :focus-within) .art-pixlet .a-check {
  animation-name: art-pop;
  animation-delay: 1s;
  animation-duration: 0.4s;
}
/* Fontscope: the overprinted letters line up, then the closest candidate is marked. */
.tool:is(:hover, :focus-within) .art-fontscope .a-cyan {
  animation-name: fs-cyan;
  animation-duration: 1.1s;
}
@keyframes fs-cyan {
  from {
    transform: translate(-9px, 5px);
  }
}
.tool:is(:hover, :focus-within) .art-fontscope .a-magenta {
  animation-name: fs-magenta;
  animation-duration: 1.1s;
}
@keyframes fs-magenta {
  from {
    transform: translate(9px, -5px);
  }
}
.tool:is(:hover, :focus-within) .art-fontscope .a-row {
  animation-name: art-arrive;
  animation-delay: calc(0.3s + var(--i) * 0.2s);
  animation-duration: 0.4s;
}
.tool:is(:hover, :focus-within) .art-fontscope .a-check {
  animation-name: art-pop;
  animation-delay: 1.2s;
  animation-duration: 0.4s;
}
@media (prefers-reduced-motion: reduce) {
  .tool .art * {
    animation: none !important;
  }
}
