/* The Index / garden.css. A sticky note on the left, square cards on the right. */

.gd {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  width: min(1120px, calc(100vw - 48px));
  margin-inline: calc(50% - min(560px, 50vw - 24px));
  margin-top: var(--s-5);
  align-items: start;
}
.gd__side { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 12px; }
.gd__back { margin: 0 0 18px; }
.gd-page .gd { margin-top: 0; }
.gd__h { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.gd__intro { margin: 0; font-size: 13.5px; line-height: 21px; color: var(--ink-muted); }
.gd__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gd__chip {
  font: 500 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-full); padding: 7px 10px;
  transition: color .2s ease, border-color .2s ease;
}
.gd__chip:hover { color: var(--ink); }
.gd__chip[aria-pressed="true"] { color: var(--marker); border-color: var(--marker); }

.gd__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gd__item[hidden] { display: none; }

.gd__card {
  position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 1 / 1;
  padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden;
  background: color-mix(in srgb, var(--ink) 2.5%, var(--ground));
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), border-color .3s ease;
}
.gd__card:hover { transform: translateY(-3px) rotate(-.4deg); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.gd__card:focus-visible { outline: 2px solid var(--marker); outline-offset: 3px; }

.gd__note { padding: 18px; gap: 12px; }
.gd__line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0;
  font: 400 10.5px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.gd__line b { font-size: 12px; font-weight: 500; color: var(--marker); font-variant-numeric: tabular-nums; }
.gd__title { font-size: 19px; line-height: 1.25; font-weight: 500; letter-spacing: -.015em; }
.gd__rule { height: 1px; width: 100%; background-image: linear-gradient(to right, var(--line) 3px, transparent 3px); background-size: 9px 1px; }
.gd__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; flex: 0 1 auto; min-height: 0;
  font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.gd__more { margin-top: auto; font: 500 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }

.gd__shot { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.gd__shot img, .gd__shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.gd__shot--contain { background: #0B0B0B; }
.gd__shot--contain img { object-fit: contain; padding: 18px; }
.gd__ext { margin-top: 4px; color: var(--ink-muted); text-decoration: underline; text-underline-offset: .2em; }
.gd__ext:hover { color: var(--ink); }
.gd__print:hover .gd__shot img, .gd__print:hover .gd__shot video { transform: scale(1.03); }
.gd__play { position: absolute; top: 10px; right: 10px; padding: 5px 8px; border-radius: 999px;
  font: 500 9px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.55); }

/* The foot: a ruled strip split into cells, the card's tag ringed in red pen. */
.gd__foot { display: flex; flex: none; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 2.5%, var(--ground)); }
.gd__note .gd__foot { margin: auto -18px -18px; }
.gd__cell {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 13px 8px; font: 400 10.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gd__cell + .gd__cell { border-left: 1px solid var(--line); }
.gd__cell--cap { flex: 2.6 1 0; justify-content: space-between; gap: 8px; padding-inline: 14px 12px; color: var(--ink); letter-spacing: .04em; }
.gd__captxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gd__cell--cap b { flex: none; font-weight: 500; color: var(--marker); font-variant-numeric: tabular-nums; }
.gd__cell--no { flex: 0 0 auto; padding-inline: 12px; color: var(--marker); font-weight: 500; font-variant-numeric: tabular-nums; }
.gd__cell--read { color: var(--ink); }
.gd__cell.is-on { overflow: visible; color: var(--ink); }
.gd__ringed { position: relative; padding: 0 2px; }
.gd__ring { position: absolute; left: -9px; right: -9px; top: -7px; bottom: -7px; width: calc(100% + 18px); height: calc(100% + 14px); overflow: visible; pointer-events: none; }
.gd__ring path { fill: none; stroke: var(--marker); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 260; stroke-dashoffset: 0; transition: stroke-dashoffset .6s cubic-bezier(.16, 1, .3, 1); }

.gd__dlg { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--ground); color: var(--ink);
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: hidden; }
.gd__dlg::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.gd__dlg[open] { animation: gd-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes gd-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.gd__dlg-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); max-height: calc(100vh - 48px); }
.gd__dlg-inner.is-media-only { grid-template-columns: minmax(0, 1fr); }
.gd__dlg-inner.is-text-only { grid-template-columns: minmax(0, 1fr); }
.gd__dlg-media { background: #000; display: grid; place-items: center; min-height: 0; }
.gd__dlg-media:empty { display: none; }
.gd__dlg-media img, .gd__dlg-media video { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; display: block; }
.gd__dlg-text { padding: 28px 56px 28px 28px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.gd__dlg-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.02em; }
.gd__dlg-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--body); }
.is-media-only .gd__dlg-text { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.9); color: #171717; gap: 4px; }
.is-media-only .gd__dlg-title { font-size: 14px; }
.is-media-only .gd__line { color: #555; }
.gd__dlg-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: #171717; background: rgba(255,255,255,.9); }

@media (max-width: 960px) { .gd__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .gd { grid-template-columns: minmax(0, 1fr); }
  .gd__side { position: static; }
  .gd__dlg-inner { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .gd__dlg-media img, .gd__dlg-media video { max-height: 60vh; }
}
@media (max-width: 480px) { .gd__grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .gd__card, .gd__shot img, .gd__shot video, .gd__ring path { transition: none; }
  .gd__card:hover { transform: none; }
  .gd__dlg[open] { animation: none; }
}

/* Interactions in the same frame: the record grid sits in the right column. */
.gd .record--grid { width: auto; margin-inline: 0; }
@media (max-width: 1100px) { .gd .record--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .gd .record--grid { grid-template-columns: minmax(0, 1fr); } }

/* Interaction cards: same height across a row, tools pinned to the bottom. */
.gd .record--grid .record__row { display: flex; flex-direction: column; gap: 14px; }
.gd .record--grid .record__media { flex: none; }
.gd .record--grid .record__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.gd .record--grid .record__body .meta--micro { margin-top: auto; padding-top: 10px; }
