/* ToolMakersHub — landing page, project pages and blog.
   Uses the brand tokens from tmh.css (--brand, --surface-2, --border, ...). */

.sc-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sc-section { padding: 56px 0; }
.sc-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.sc-h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.sc-lead { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0; max-width: 620px; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sc-grad { background: linear-gradient(90deg, var(--logo-from), var(--logo-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.sc-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.sc-btn:hover { transform: translateY(-1px); }
.sc-btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 20px -8px var(--brand); }
.sc-btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.sc-btn-sm { padding: 8px 14px; font-size: 13px; }
.sc-btn:focus-visible, .sc-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Hero: copy on the left, the product hub on the right */
.sc-hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.sc-hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 620px; background:
    radial-gradient(closest-side, color-mix(in srgb, var(--logo-from) 20%, transparent), transparent 70%) 78% 45% / 55% 100% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--logo-to) 16%, transparent), transparent 70%) 18% 30% / 45% 90% no-repeat;
    pointer-events: none; z-index: -1; }
.sc-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.sc-hook { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--border); }
.sc-hook::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--logo-from), var(--logo-to)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--logo-to) 20%, transparent); }
.sc-hero h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.05em; margin: 0 0 14px; }
.sc-hero .sc-hero-tagline { font-size: clamp(18px, 2.3vw, 22px); font-weight: 700; color: var(--text); letter-spacing: -.02em; margin: 0 0 14px; }
.sc-hero .sc-hero-lead { font-size: clamp(16px, 1.8vw, 18px); color: var(--muted); line-height: 1.65; max-width: 540px; margin: 0 0 28px; }
.sc-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.sc-hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 14px; }
.sc-hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.sc-hero-points li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--logo-to) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300b49a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* Product hub: our mark in the centre, products orbiting like the atoms on the logo */
.sc-hub { --r: 38cqw; container-type: inline-size; position: relative; width: min(440px, 100%); aspect-ratio: 1; margin: 0 auto; }
.sc-hub-ring { position: absolute; inset: 12%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--brand-2) 45%, var(--border)); animation: sc-spin 80s linear infinite; }
.sc-hub-ring::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.sc-hub-core { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 30%; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--logo-from) 70%, transparent); }
.sc-hub-core svg { width: 72%; height: auto; }
.sc-hub-node { --a: calc(360deg / var(--n) * var(--i) - 90deg); position: absolute; left: 50%; top: 50%; display: grid; justify-items: center; gap: 6px; width: 108px; text-decoration: none; color: var(--text);
    transform: translate(-50%, -50%) translate(calc(cos(var(--a)) * var(--r)), calc(sin(var(--a)) * var(--r))); transition: transform .2s; }
.sc-hub-node .glyph { width: 52px; height: 52px; border-radius: 15px; font-size: 15px; box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--logo-from) 80%, transparent); transition: transform .2s; }
.sc-hub-node:hover .glyph, .sc-hub-node:focus-visible .glyph { transform: translateY(-3px) scale(1.06); }
.sc-hub-node:focus-visible { outline: none; }
.sc-hub-node:focus-visible .glyph { outline: 3px solid var(--brand); outline-offset: 3px; }
.sc-hub-label { font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25; background: color-mix(in srgb, var(--bg) 82%, transparent); padding: 2px 8px; border-radius: 999px; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sc-hub-ring { animation: none; } }

/* Filter chips */
.sc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-chip { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; }
.sc-chip[aria-pressed="true"], .sc-chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Project cards */
.sc-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.sc-card { position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 22px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sc-card:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.sc-card.is-featured { background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, var(--logo-from), var(--logo-to)) border-box; border: 1.5px solid transparent; }
.sc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-card h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.sc-card h3 a { color: inherit; text-decoration: none; }
.sc-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.sc-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14.5px; }
.sc-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.sc-card li { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px; color: var(--muted); }
.sc-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.sc-card-foot .sc-btn { position: relative; z-index: 1; }
[data-theme="dark"] .sc-status.live { color: #34d399; }
.sc-card.is-soon { opacity: .85; }
.sc-empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--border); border-radius: 20px; }

/* "How it works" strip */
.sc-band { background: var(--surface-2); border-radius: 28px; padding: 40px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sc-band h3 { margin: 12px 0 6px; font-size: 17px; }
.sc-band p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* Blog cards */
.sc-posts { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sc-post { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--bg); transition: box-shadow .15s, transform .15s; }
.sc-post:hover { box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.sc-post-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--logo-from) 30%, var(--surface-2)), color-mix(in srgb, var(--logo-to) 30%, var(--surface-2))); display: grid; place-items: center; }
.sc-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sc-post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.sc-post h3 { margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.sc-post h3 a { color: inherit; text-decoration: none; }
.sc-post h3 a::after { content: ""; position: absolute; inset: 0; }
.sc-post p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.sc-tagline { color: var(--brand); font-weight: 600; }
.sc-ai { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

/* Blog index toolbar */
.sc-blog-hero { padding: 48px 0 8px; }
.sc-blog-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.04em; margin: 0 0 8px; }
.sc-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 24px 0 28px; }
.sc-search { flex: 1 1 260px; max-width: 380px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 25px; padding: 10px 16px; background: var(--bg); }
.sc-search input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; width: 100%; }
.sc-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.sc-filter-note { font-size: 14px; color: var(--muted); margin: -12px 0 20px; }

/* Pagination (blog._pager markup) */
.sc-pager { margin-top: 36px; display: flex; justify-content: center; }
.sc-pager .pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.sc-pager .page-item > * { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; }
.sc-pager .page-item.active > * { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sc-pager .page-item.disabled > * { opacity: .45; }

/* Article */
.sc-article { max-width: 760px; margin: 0 auto; padding: 40px 20px 20px; }
.sc-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.sc-crumbs a { color: var(--muted); text-decoration: none; }
.sc-crumbs a:hover { color: var(--brand); }
.sc-article h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; margin: 0 0 16px; }
.sc-article .sc-post-meta { font-size: 14px; margin-bottom: 24px; }
.sc-article-cover { border-radius: 20px; overflow: hidden; margin: 0 0 32px; border: 1px solid var(--border); }
.sc-article-cover img { width: 100%; display: block; }
.sc-preview-bar { background: #fff4d6; color: #6b4e00; border: 1px solid #f2d27a; border-radius: 14px; padding: 10px 14px; font-size: 14px; margin-bottom: 20px; }

.sc-prose { font-size: 17.5px; line-height: 1.75; }
.sc-prose > * + * { margin-top: 1.1em; }
.sc-prose h2 { font-size: 26px; letter-spacing: -.02em; margin-top: 1.8em; line-height: 1.25; }
.sc-prose h3 { font-size: 21px; margin-top: 1.5em; }
.sc-prose a { color: var(--brand); text-underline-offset: 3px; }
.sc-prose img { max-width: 100%; border-radius: 14px; }
.sc-prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--brand-2); color: var(--muted); }
.sc-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.sc-prose pre { background: #14151c; color: #e8e9f0; padding: 18px 20px; border-radius: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.sc-prose pre code { background: none; padding: 0; color: inherit; }
.sc-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.sc-prose th, .sc-prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.sc-prose th { background: var(--surface-2); }
.sc-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }

.sc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 36px 0 0; }
.sc-project-cta { margin-top: 40px; display: flex; gap: 16px; align-items: center; border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; background: var(--surface-2); }
.sc-project-cta div { flex: 1; }
.sc-project-cta b { display: block; }
.sc-project-cta span { color: var(--muted); font-size: 14px; }

/* Project page */
.sc-project-hero { padding: 56px 0 28px; display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.sc-project-hero h1 { margin: 0 0 6px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; font-weight: 800; }
.sc-project-hero p { margin: 0 0 18px; color: var(--muted); font-size: 18px; max-width: 640px; line-height: 1.6; }
.sc-features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; margin: 0; }
.sc-features li { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.sc-features li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--logo-from), var(--logo-to)); flex: none; }

@media (max-width: 640px) {
    .sc-section { padding: 40px 0; }
    .sc-band { padding: 26px; border-radius: 22px; }
    .sc-project-cta { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-btn, .sc-card, .sc-post { transition: none; }
    .sc-btn:hover, .sc-card:hover, .sc-post:hover { transform: none; }
}

/* Hero on tablets and phones: stack, centre the copy, smaller hub */
@media (max-width: 900px) {
    .sc-hero { padding: 40px 0 24px; }
    .sc-hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .sc-hero .sc-hero-lead { margin-left: auto; margin-right: auto; }
    .sc-hero-cta, .sc-hero-points { justify-content: center; }
    .sc-hub { width: min(340px, 92vw); }
    .sc-hub-node { width: 92px; }
    .sc-hub-node .glyph { width: 44px; height: 44px; border-radius: 13px; font-size: 13px; }
    .sc-hub-label { font-size: 11.5px; }
}

/* Products toolbar: filters + search */
.sc-products-bar { margin: 0 0 22px; }
.sc-products-bar .sc-search { flex: 0 1 320px; }
.sc-filter-note { margin: -8px 0 20px; }
@media (max-width: 640px) { .sc-products-bar .sc-search { flex: 1 1 100%; max-width: none; } }
