@font-face {
  font-family: "Instrument Sans";
  src: url("./instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

.cards {
  --ink: #551e30;
  --rule: rgb(85 30 48 / 18%);
  --side: clamp(16px, 3.1vw, 58px);
  --bottom: clamp(8px, 2.4vh, 30px);
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--ink);
  font: 450 1rem/1.4 "Instrument Sans", Arial, sans-serif;
}

.corner {
  position: absolute;
  bottom: calc(var(--bottom) + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
}
.insight { left: calc(var(--side) + env(safe-area-inset-left, 0px)); }
.contact { right: calc(var(--side) + env(safe-area-inset-right, 0px)); }

.corner summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px;
  min-height: 46px;
  min-width: 46px;
  font-size: .875rem;
  font-weight: 550;
  list-style: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.corner summary::-webkit-details-marker { display: none; }
.opener {
  width: 8px;
  height: 8px;
  position: relative;
  opacity: .84;
}
.opener::before, .opener::after {
  content: "";
  position: absolute;
  background: currentColor;
  inset: 3px 0 auto;
  height: 1.5px;
}
.opener::after { transform: rotate(90deg); }
.corner[open] .opener::after { transform: rotate(0); }
.corner summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.card {
  position: absolute;
  bottom: calc(100% + 4px);
  width: min(24rem, calc(100vw - var(--side) * 2 - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  padding: clamp(22px, 2.3vw, 30px);
  overflow: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 92px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 92px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff7ed;
  box-shadow: 0 6px 32px -12px rgb(67 18 32 / 20%);
}
.insight .card { left: 0; }
.contact .card { right: 0; max-width: 20.25rem; }
.card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.2vw, 2.05rem);
  font-weight: 550;
  line-height: 1.08;
  letter-spacing: -.06em;
}
.notes {
  display: grid;
  gap: 13px;
  border-top: 1px solid var(--rule);
  margin: 18px 0 0;
  padding-top: 15px;
  font-size: .875rem;
  line-height: 1.45;
}
.notes > div {
  display: grid;
  grid-template-columns: 4.25em 1fr;
  align-items: baseline;
  gap: 12px;
}
.notes dt { font-weight: 650; }
.notes dd { margin: 0; }
.contact h2 { overflow-wrap: anywhere; user-select: all; }
.signature { margin: 12px 0 0; font-size: .875rem; }
.mail-status {
  margin: 17px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--rule);
  color: #774651;
  font-size: .77rem;
}
@media (hover: hover) {
  .corner summary:hover { text-decoration: underline; text-underline-offset: .23em; }
}
@media (prefers-reduced-motion: no-preference) {
  .corner[open] .card { animation: show-card .18s ease-out; }
  @keyframes show-card { from { opacity: 0; transform: translateY(4px); } }
}
@media (forced-colors: active) {
  .card { border-color: CanvasText; background: Canvas; }
  .opener::before, .opener::after { background: ButtonText; }
}
