/* ==========================================================================
   Writeup detail pages — article prose, terminal card, screenshots.
   Loaded after styles.css (which provides the theme tokens and chrome).
   ========================================================================== */

.article {
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) var(--gutter) clamp(56px, 9vw, 96px);
}

/* Breadcrumb ------------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.crumbs a {
  color: var(--text-secondary);
  transition: color 0.15s var(--ease);
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs__sep {
  opacity: 0.55;
}

/* Header ---------------------------------------------------------------- */

.article__header {
  margin-bottom: clamp(24px, 4vw, 36px);
}

.article__title {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.article__lead {
  max-width: 44rem;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

/* Machine card (terminal) ----------------------------------------------- */

.machine-card {
  max-width: 46rem;
  margin: 0 auto clamp(28px, 5vw, 44px);
  border: 1px solid #5e2750;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #300a24;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
}

.machine-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #2c001e;
}

.machine-card__path {
  color: #d9d9d9;
  font-size: 0.76rem;
}

.machine-card__dots {
  display: flex;
  gap: 8px;
}

.machine-card__dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.machine-card__dots i:nth-child(1) {
  background: #febc2e;
}
.machine-card__dots i:nth-child(2) {
  background: #28c840;
}
.machine-card__dots i:nth-child(3) {
  background: #ff5f57;
}

.machine-card__body {
  padding: 18px 20px;
  color: #ffffff;
}

.machine-card__prompt .u,
.machine-card__creds .u {
  color: #8ae234;
}

.machine-card__prompt .p,
.machine-card__creds .p {
  color: #729fcf;
}

.machine-card__creds .u {
  color: #fce94f;
}

.machine-card__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin-top: 12px;
}

.machine-card__avatar {
  width: 118px;
  height: 118px;
  border: 2px solid #5e2750;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.machine-card__info {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 210px;
  margin: 0;
}

.machine-card__info > div {
  display: flex;
  gap: 10px;
}

.machine-card__info dt {
  flex: 0 0 6.5em;
  color: #d3c7d1;
}

.machine-card__info dd {
  margin: 0;
}

.machine-card__note {
  margin-top: 14px;
  color: #d3c7d1;
}

.machine-card__creds {
  margin-top: 6px;
}

.machine-card__cursor {
  opacity: 0.6;
}

/* Article prose --------------------------------------------------------- */

.prose-article {
  color: var(--text-secondary);
}

.prose-article > * + * {
  margin-top: 1.15em;
}

.prose-article h2 {
  margin-top: 2.4em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.prose-article h3 {
  margin-top: 2em;
  color: var(--text-primary);
  font-size: clamp(1.12rem, 2.4vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.prose-article h4 {
  margin-top: 1.7em;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.prose-article p {
  font-size: 1rem;
  line-height: 1.78;
  text-wrap: pretty;
}

.prose-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose-article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.prose-article ul,
.prose-article ol {
  padding-left: 1.4em;
  list-style: revert;
}

.prose-article li {
  margin-top: 0.4em;
  line-height: 1.7;
}

.prose-article hr {
  height: 1px;
  margin: 2.2em 0;
  border: 0;
  background: var(--border-subtle);
}

/* Inline code */
.prose-article :not(pre) > code {
  padding: 0.15em 0.42em;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.86em;
  word-break: break-word;
}

/* Code blocks (terminal look, both themes) */
.prose-article pre {
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: #101010;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
}

.prose-article pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

/* Screenshots */
.shot {
  margin: 1.6em 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* Blockquote */
.prose-article blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.1em;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-style: italic;
}

/* Article footer -------------------------------------------------------- */

.article__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 7vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 30rem) {
  .machine-card__info dt {
    flex-basis: 5.5em;
  }

  .prose-article pre {
    font-size: 0.74rem;
  }
}
