/* ========== CraftMat Studio — sub-page system (guides, changelog, press, legal) ========== */

.sub-main { padding-top: calc(var(--nav) + 40px); padding-bottom: 96px; }

/* ---------- breadcrumb + article scaffold ---------- */
.article { max-width: 820px; margin: 0 auto; padding: 0 var(--gut); }
.crumbs { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-6); }
.crumbs a { color: var(--ink); }
.crumbs a:hover { color: var(--accent-bright); }
.crumbs .sep { color: var(--muted-2, #7b889c); }

.article h1 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: var(--display-tracking-xl, -0.04em); font-weight: var(--display-weight); text-wrap: balance; margin-bottom: var(--s-4); }
.article .lede { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 62ch; margin-bottom: var(--s-7); text-wrap: pretty; }
.article h2 { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: var(--display-tracking, -0.03em); font-weight: var(--display-weight); margin: var(--s-7) 0 var(--s-4); }
.article h3 { font-size: 17px; font-weight: 500; color: var(--ink); margin: var(--s-5) 0 var(--s-2); }
.article p { font-size: 16px; line-height: 1.65; color: var(--text-soft, var(--ink)); max-width: 68ch; margin-bottom: var(--s-4); }
.article p strong, .article li strong { color: var(--ink); font-weight: 500; }
.article ul, .article ol { margin: 0 0 var(--s-4); padding-left: 1.4em; font-size: 16px; line-height: 1.65; color: var(--text-soft, var(--ink)); max-width: 68ch; }
.article li { margin-bottom: var(--s-2); }
.article a { color: var(--accent-bright, #52c6cc); text-decoration: none; }
.article a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article img { border-radius: var(--r-lg); border: 1px solid var(--line); margin: var(--s-5) 0; }
.article code { font-family: var(--font-mono); font-size: .92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* a callout box inside a guide */
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--p-accent); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin: var(--s-5) 0; font-size: 15px; line-height: 1.6; }
.callout b { color: var(--ink); }

/* the try-it strip at the end of a guide */
.try-it { display: flex; gap: var(--s-4); align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--p-surface, #0c1019); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); margin-top: var(--s-7); }
.try-it p { margin: 0; font-size: 16px; max-width: 44ch; }

/* ---------- guides index cards ---------- */
.guide-list { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.guide-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); transition: border-color .25s, transform .25s; text-decoration: none; }
.guide-card:hover { border-color: var(--p-accent); transform: translateY(-2px); }
.guide-card h2 { margin: 0 0 var(--s-2); font-family: var(--font-text); font-size: 20px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.guide-card p { margin: 0; font-size: 15px; color: var(--muted); max-width: 68ch; }
.guide-card .guide-meta { margin-top: var(--s-3); font-family: var(--font-mono); font-size: 12px; color: var(--muted-2, #7b889c); letter-spacing: .03em; }

/* ---------- changelog timeline ---------- */
.change-list { display: grid; gap: 0; margin-top: var(--s-6); border-top: 1px solid var(--line); }
.change { display: grid; grid-template-columns: 150px 1fr; gap: var(--s-6); padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.change time { font-family: var(--font-mono); font-size: 13px; color: var(--accent-bright, #52c6cc); padding-top: 3px; }
.change h2 { margin: 0 0 var(--s-2); font-family: var(--font-text); font-size: 19px; font-weight: 500; color: var(--ink); }
.change p { margin: 0; font-size: 15px; }
.change ul { margin-top: var(--s-3); }
@media (max-width: 639px) {
  .change { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ---------- press kit ---------- */
.fact-table { width: 100%; border-collapse: collapse; margin: var(--s-5) 0; font-size: 15px; }
.fact-table th, .fact-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table th { width: 38%; color: var(--muted); font-weight: 500; }
.fact-table td { color: var(--ink); }
.asset-row { display: flex; gap: var(--s-4); flex-wrap: wrap; margin: var(--s-5) 0; }
.asset-row a { display: flex; flex-direction: column; gap: 8px; width: 200px; text-decoration: none; }
.asset-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); margin: 0; }
.asset-row span { font-size: 13px; color: var(--muted); }

/* ---------- compact sub-page footer ---------- */
.footer--sub { border-top: 1px solid var(--hairline-soft, var(--line)); padding: 48px 0 32px; }
.footer--sub .footer-inner { display: flex; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; max-width: 1280px; margin: 0 auto; padding: 0 var(--gut); }
.footer--sub p { margin: 0; font-size: 14px; color: var(--muted); max-width: 52ch; }
.footer--sub a { color: var(--ink); }
.footer--sub nav { display: flex; gap: var(--s-5); flex-wrap: wrap; font-size: 14px; }
.footer--sub a:hover { color: var(--accent-bright); }
.footer--sub .legal { max-width: 1280px; margin: var(--s-5) auto 0; padding: var(--s-4) var(--gut) 0; border-top: 1px solid var(--hairline-soft, var(--line)); font-size: 12px; color: var(--muted-2, #7b889c); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

@media (max-width: 639px) {
  .asset-row a { width: 140px; }
  .crumbs { margin-bottom: var(--s-5); }
}
