@import '/assets/app/shared/styles/site/index.615452d2f7b1a18.css';

/* An essay: its date and title, the table of contents, the body as prose (studio/style.css),
   and the newer and older piece in the same collection. */
.studio-essay-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.studio-essay-date {
  order: -1;
  color: var(--ink-dim);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.studio-essay-title {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
}

.studio-essay-media {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.studio-essay-media a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: var(--space-1-5) var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  text-decoration: none;
}

.studio-essay-media a:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

/* The contents: a quiet box in the sans, open by default, its marker drawn as a chevron. */
.studio-toc {
  margin-bottom: var(--space-10);
  border-block: 1px solid var(--rule);
  font-size: var(--text-sm);
}

.studio-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.studio-toc summary::-webkit-details-marker {
  display: none;
}

.studio-toc summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  margin-right: var(--space-1);
  border-right: 1.5px solid var(--ink-dim);
  border-bottom: 1.5px solid var(--ink-dim);
  transform: rotate(45deg) translate(-2px, -2px);
}

.studio-toc[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.studio-toc nav {
  padding-bottom: var(--space-4);
}

.studio-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.studio-toc-list li {
  padding-block: var(--space-1);
  line-height: 1.45;
}

.studio-toc-list .studio-toc-list {
  margin-top: var(--space-1);
  padding-left: var(--space-4);
  border-left: 1px solid var(--rule-soft);
}

.studio-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.studio-toc a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.studio-essay-body {
  margin-inline: 0;
}

/* Code blocks carry a Copy button (markdown.ts); the button sits in the block's corner. */
.studio-code-block {
  position: relative;
}

.studio-code {
  overflow-x: auto;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-control);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8em;
  line-height: 1.6;
  tab-size: 2;
}

.studio-code:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.studio-copy-button {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: var(--space-0-5) var(--space-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--ink-dim);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  line-height: 1.6;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}

.studio-code-block:hover .studio-copy-button,
.studio-copy-button:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .studio-copy-button {
    opacity: 1;
  }
}

.studio-copy-button:hover {
  color: var(--ink);
}

/* Newer and older, as two halves under a rule. */
.studio-essay-neighbours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.studio-essay-neighbours a {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: var(--ink);
  text-decoration: none;
}

.studio-essay-neighbours .is-older {
  align-items: flex-end;
  text-align: right;
}

.studio-essay-neighbour-label {
  color: var(--ink-dim);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-essay-neighbour-title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  line-height: var(--leading-snug);
  text-wrap: balance;
}

.studio-essay-neighbours a:hover .studio-essay-neighbour-title {
  color: var(--accent);
}

@media (max-width: 640px) {
  .studio-essay-neighbours {
    grid-template-columns: 1fr;
  }

  .studio-essay-neighbours .is-older {
    align-items: flex-start;
    text-align: left;
  }
}
