/* Hamgoft's green identity, on the journal's tactile paper. Loaded on opted-in posts only. */
.entry-content .hamgoft-cta {
  --hamgoft-color: #16896a;
  --hamgoft-button-color: #147b5f;
  --hamgoft-button-text: #fff;
  position: relative;
  display: grid;
  min-width: 0;
  gap: 16px 24px;
  padding: 25px;
  margin-block: 3rem;
  border: 2px solid var(--frame);
  border-radius: 22px;
  background: color-mix(in srgb, var(--hamgoft-color) 8%, var(--paper-raised));
  color: var(--ink);
  box-shadow: 0 3px 0 var(--sheet-edge), 0 7px 0 var(--depth);
  isolation: isolate;
  overflow-wrap: anywhere;
}
.hamgoft-cta::before {
  position: absolute;
  top: -11px;
  left: 29px;
  width: 65px;
  height: 22px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--hamgoft-color) 20%, var(--paper-raised));
  opacity: .83;
  transform: rotate(-6deg);
  content: "";
  pointer-events: none;
}
.hamgoft-cta--inline { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand brand" "copy actions"; }
.hamgoft-cta--final { grid-template-columns: minmax(0, 1fr) 205px; grid-template-areas: "brand conversation" "copy conversation" "actions actions"; }
.hamgoft-cta__brand { display: flex; grid-area: brand; align-items: center; gap: 11px; }
.hamgoft-cta__brand > div { min-width: 0; }
.hamgoft-cta__mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1.5px solid var(--frame);
  border-radius: 13px;
  background: var(--hamgoft-color);
  color: var(--hamgoft-button-text);
  box-shadow: 0 3px 0 var(--depth), inset 0 2px 0 rgba(255,255,255,.18);
  transform: rotate(3deg);
}
.hamgoft-cta__mark svg { width: 25px; height: 25px; }
.hamgoft-cta__brand strong { display: block; font-size: 1.12rem; font-weight: 850; line-height: 1.5; }
.hamgoft-cta__brand small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .58rem; }
.hamgoft-cta__copy { grid-area: copy; min-width: 0; }
.entry-content .hamgoft-cta__kicker { margin: 0 0 5px; color: var(--ink-soft); font-size: .6rem; font-weight: 650; }
.entry-content .hamgoft-cta h3 { margin: 0 0 9px; color: var(--ink); font-size: 1.15rem; font-weight: 850; line-height: 1.7; letter-spacing: -.025em; }
.entry-content .hamgoft-cta--final h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); line-height: 1.6; }
.entry-content .hamgoft-cta__text { margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 2; }
.hamgoft-cta__actions { display: flex; grid-area: actions; flex-wrap: wrap; align-self: center; align-items: center; gap: 13px 18px; min-width: 0; }
.hamgoft-cta--inline .hamgoft-cta__actions { width: 185px; flex-direction: column; align-items: stretch; gap: 12px; }
.entry-content .hamgoft-cta a.hamgoft-cta__button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 18px;
  border: 2px solid var(--frame);
  border-radius: 13px;
  background: var(--hamgoft-button-color);
  color: var(--hamgoft-button-text);
  text-decoration: none;
  font-size: .73rem;
  font-weight: 800;
  line-height: 1.8;
  box-shadow: 0 4px 0 var(--depth), inset 0 2px 0 rgba(255,255,255,.18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.entry-content .hamgoft-cta a.hamgoft-cta__button:hover { color: var(--hamgoft-button-text); transform: translateY(-2px); box-shadow: 0 6px 0 var(--depth); }
.entry-content .hamgoft-cta a.hamgoft-cta__button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--depth); }
.entry-content .hamgoft-cta a:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.hamgoft-cta__button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.entry-content .hamgoft-cta a.hamgoft-cta__secondary { display: inline-flex; min-height: 44px; align-items: center; border-bottom: 1px solid var(--line-strong); color: var(--ink); font-size: .68rem; text-decoration: none; }
.hamgoft-cta__note { display: flex; align-items: flex-start; gap: 5px; color: var(--ink-soft); font-size: .55rem; line-height: 1.9; }
.hamgoft-cta__note svg { width: 12px; height: 12px; margin-top: 2px; flex: 0 0 auto; }
.hamgoft-cta--final .hamgoft-cta__note { width: 100%; }
.entry-content .hamgoft-cta__features { display: flex; flex-wrap: wrap; list-style: none; gap: 7px; padding: 0; margin: 19px 0 0; }
.entry-content .hamgoft-cta__features li { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: 6px; padding: 5px 9px; margin: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-raised); color: var(--ink-soft); font-size: .58rem; line-height: 1.8; }
.hamgoft-cta__features svg { width: 14px; height: 14px; flex: 0 0 auto; }
.hamgoft-cta__conversation {
  display: flex;
  grid-area: conversation;
  min-width: 0;
  align-self: center;
  flex-direction: column;
  gap: 15px;
  padding: 16px 13px;
  border: 1.5px solid var(--frame);
  border-radius: 16px;
  background: url("../images/hamgoft-pattern.svg") center / 260px 260px, color-mix(in srgb, var(--hamgoft-color) 12%, var(--paper-raised));
  box-shadow: 0 4px 0 var(--sheet-edge), 0 7px 0 var(--depth);
  transform: rotate(-3deg);
}
.hamgoft-cta__chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); color: var(--ink); font-size: .6rem; font-weight: 800; }
.hamgoft-cta__chat-head > span { display: inline-flex; align-items: center; gap: 5px; }
.hamgoft-cta__chat-head svg { width: 14px; height: 14px; }
.hamgoft-cta__bubble { max-width: 91%; padding: 10px 11px; border: 1px solid var(--frame); border-radius: 12px 3px 12px 12px; background: var(--paper-raised); box-shadow: 0 2px 0 var(--sheet-edge); color: var(--ink); font-size: .67rem; line-height: 1.8; }
.hamgoft-cta__bubble--own { margin-right: auto; border-radius: 3px 12px 12px 12px; background: color-mix(in srgb, var(--hamgoft-color) 24%, var(--paper-raised)); }
.hamgoft-cta__bubble--own svg { width: 13px; height: 13px; margin: 3px auto 0 0; }
.hamgoft-cta__typing { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper-raised); }
.hamgoft-cta__typing > span { width: 4px; height: 4px; border-radius: 50%; background: var(--hamgoft-color); }
.hamgoft-cta__typing > svg { width: 13px; height: 13px; margin-right: auto; color: var(--ink-soft); }
body.focus-mode .hamgoft-cta { display: none; }

@media (max-width:1050px) {
  .hamgoft-cta--inline { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "copy" "actions"; }
  .hamgoft-cta--inline .hamgoft-cta__actions { width: auto; flex-direction: row; align-items: center; }
  .hamgoft-cta--inline .hamgoft-cta__note { max-width: 210px; }
  .hamgoft-cta--final { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "copy" "conversation" "actions"; }
  .hamgoft-cta__conversation { width: min(300px, 100%); justify-self: center; margin-block: 10px; }
}

@media (max-width:760px) {
  .entry-content .hamgoft-cta { padding: 21px 18px; margin-block: 2.5rem; gap: 17px; border-radius: 17px; }
  .hamgoft-cta__mark { width: 38px; height: 38px; border-radius: 11px; }
  .hamgoft-cta__brand strong { font-size: 1.02rem; }
  .entry-content .hamgoft-cta h3 { font-size: 1.1rem; }
  .entry-content .hamgoft-cta--final h3 { font-size: 1.4rem; }
  .entry-content .hamgoft-cta__text { font-size: .76rem; }
  .hamgoft-cta__actions, .hamgoft-cta--inline .hamgoft-cta__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hamgoft-cta--inline .hamgoft-cta__note { max-width: none; }
  .entry-content .hamgoft-cta a.hamgoft-cta__button { width: 100%; padding-inline: 10px; font-size: .68rem; }
  .entry-content .hamgoft-cta a.hamgoft-cta__secondary { justify-content: center; }
  .hamgoft-cta__conversation { width: min(275px, 96%); transform: rotate(-2deg); }
}

@media (prefers-reduced-motion:reduce) {
  .entry-content .hamgoft-cta a.hamgoft-cta__button { transition: none; }
}
@media print { .entry-content .hamgoft-cta { display: none; } }
