.fontish-snapshot-card {
  --fontish-ink: #2e2e3a;
  --fontish-muted: #625f70;
  --fontish-purple: #6a5acd;
  --fontish-deep-purple: #4c3db5;
  --fontish-lavender: #f4f2f8;
  --fontish-border: #e2deeb;
  box-sizing: border-box;
  container-type: inline-size;
  display: block;
  width: 100%;
  max-width: 820px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: #ffffff;
  border: 1px solid var(--fontish-border);
  border-radius: 14px;
  padding: clamp(20px, 3.6cqi, 30px);
  box-shadow: 0 12px 32px rgba(46, 46, 58, 0.055);
  margin: 32px auto;
}

.fontish-snapshot-card *,
.fontish-snapshot-card *::before,
.fontish-snapshot-card *::after {
  box-sizing: border-box;
}

.fontish-snapshot-card__header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.fontish-snapshot-card__header {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 3.5cqi, 29px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--fontish-ink);
}

.fontish-snapshot-card__motif {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 30px;
  border-radius: 2px;
  background: var(--fontish-purple);
  box-shadow: 14px 0 0 #efb45b, 28px 0 0 #54a999;
}

.fontish-snapshot-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #e8e4ef;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.fontish-snapshot-card__item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  min-width: 0;
  min-height: 94px;
  padding: 17px 18px;
  background: #ffffff;
  border-bottom: 1px solid #ece8f1;
}

.fontish-snapshot-card__item:nth-child(odd) {
  border-right: 1px solid #ece8f1;
}

.fontish-snapshot-card__item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

/* When the final row has a single item, let it span the full card. */
.fontish-snapshot-card__item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 0;
}

.fontish-snapshot-card__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fontish-lavender);
  color: var(--fontish-purple);
}

.fontish-snapshot-card__item:nth-child(4n + 2) .fontish-snapshot-card__icon {
  background: #f2f5ff;
  color: #3f6ae0;
}

.fontish-snapshot-card__item:nth-child(4n + 3) .fontish-snapshot-card__icon {
  background: #fff6e8;
  color: #d88a25;
}

.fontish-snapshot-card__item:nth-child(4n + 4) .fontish-snapshot-card__icon {
  background: #fff0f5;
  color: #d95b8f;
}

.fontish-snapshot-card__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fontish-snapshot-card__content {
  min-width: 0;
}

.fontish-snapshot-card__label {
  margin: 0 0 4px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: var(--fontish-ink);
}

.fontish-snapshot-card__value {
  min-width: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.5;
  color: var(--fontish-muted);
  overflow-wrap: anywhere;
}

.fontish-snapshot-card__value a {
  color: var(--fontish-deep-purple);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}

.fontish-snapshot-card__value a:hover {
  text-decoration: underline;
}

.fontish-snapshot-card__value a:focus-visible {
  outline: 2px solid var(--fontish-purple);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Keep the block inside the Gutenberg content canvas at every editor width. */
.editor-styles-wrapper .wp-block[data-type="fontish/snapshot-card"],
.block-editor-block-list__layout .wp-block[data-type="fontish/snapshot-card"] {
  width: 100%;
  max-width: 820px !important;
  min-width: 0;
  margin-left: auto !important;
  margin-right: auto !important;
}

.editor-styles-wrapper .wp-block[data-type="fontish/snapshot-card"] > .fontish-snapshot-card,
.block-editor-block-list__layout .wp-block[data-type="fontish/snapshot-card"] > .fontish-snapshot-card {
  width: 100%;
  max-width: 820px;
}

.fontish-snapshot-card__inspector .components-base-control {
  margin-bottom: 14px;
}

.fontish-snapshot-card__inspector .components-base-control__label {
  font-size: 14px;
  font-weight: 750;
  color: var(--fontish-deep-purple);
  margin-bottom: 7px;
}

.fontish-snapshot-card__inspector .components-text-control__input,
.fontish-snapshot-card__inspector textarea,
.fontish-snapshot-card__inspector input[type="text"],
.fontish-snapshot-card__inspector input[type="url"] {
  min-height: 42px;
  border-radius: 9px;
  border-color: #e2deeb;
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: none;
}

.fontish-snapshot-card__inspector .components-text-control__input:focus,
.fontish-snapshot-card__inspector textarea:focus,
.fontish-snapshot-card__inspector input:focus {
  border-color: var(--fontish-purple);
  box-shadow: 0 0 0 1px var(--fontish-purple);
}

@container (max-width: 640px) {
  .fontish-snapshot-card__grid {
    grid-template-columns: 1fr;
  }

  .fontish-snapshot-card__item,
  .fontish-snapshot-card__item:nth-child(odd),
  .fontish-snapshot-card__item:nth-last-child(-n + 2) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid #ece8f1;
  }

  .fontish-snapshot-card__item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 782px) {
  .fontish-snapshot-card {
    padding: 20px;
    margin: 26px auto;
  }

  .fontish-snapshot-card__grid {
    grid-template-columns: 1fr;
  }

  .fontish-snapshot-card__item,
  .fontish-snapshot-card__item:nth-child(odd),
  .fontish-snapshot-card__item:nth-last-child(-n + 2) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid #ece8f1;
  }

  .fontish-snapshot-card__item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .fontish-snapshot-card {
    padding: 17px;
    border-radius: 12px;
  }

  .fontish-snapshot-card__header-wrap {
    margin-bottom: 16px;
  }

  .fontish-snapshot-card__item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    min-height: 0;
    padding: 15px;
  }

  .fontish-snapshot-card__icon {
    width: 34px;
    height: 34px;
  }

  .fontish-snapshot-card__icon svg {
    width: 19px;
    height: 19px;
  }

  .fontish-snapshot-card__motif {
    margin-right: 20px;
    box-shadow: 12px 0 0 #efb45b, 24px 0 0 #54a999;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fontish-snapshot-card *,
  .fontish-snapshot-card *::before,
  .fontish-snapshot-card *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
