/* ==========================================================================
   Section scaffolding
   ========================================================================== */
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--ink { background: var(--ink); color: #f1f1ed; }
.section--ink h2, .section--ink h3 { color: #f1f1ed; }
.section--ink p { color: rgba(241, 241, 237, 0.75); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); max-width: 22ch; }
.section-head p { color: var(--ink-soft); margin: 6px 0 0; }

/* ==========================================================================
   Responsive fallback for the GMP table — stacked rows on small screens
   ========================================================================== */
@media (max-width: 640px) {
	.gmp-table thead { display: none; }
	.gmp-table, .gmp-table tbody, .gmp-table tr, .gmp-table td { display: block; width: 100%; }
	.gmp-table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
	.gmp-table td { border: none; padding: 3px 0; white-space: normal; }
	.gmp-table td[data-label]::before {
		content: attr(data-label); display: block;
		font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 2px;
	}
}

/* ==========================================================================
   IPO calendar strip (upcoming timeline)
   ========================================================================== */
.calendar-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.calendar-card {
	scroll-snap-align: start; flex: 0 0 240px; border: 1px solid var(--line); background: var(--paper-raised);
	padding: 18px; border-radius: var(--radius); position: relative;
}
.calendar-card__date { font-family: var(--font-mono); font-size: 12px; color: var(--brand); }
.calendar-card h3 { font-size: 16.5px; margin: 8px 0 4px; }
.calendar-card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.calendar-card a { position: absolute; inset: 0; }

/* ==========================================================================
   Explainer cards ("what is GMP")
   ========================================================================== */
.explainer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.explainer-card { border-top: 2px solid var(--brand); padding-top: 16px; }
.explainer-card h3 { font-size: 17px; }
.explainer-card p { font-size: 14.5px; color: var(--ink-soft); }

/* ==========================================================================
   Blog / analysis — premium card grid (shared with category.php / home.php)
   ========================================================================== */
.blog-header { border-bottom: 1px solid var(--line); padding: 44px 0 28px; }
.blog-header__eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.blog-header h1 { font-size: clamp(28px, 3.8vw, 40px); margin-top: 8px; }
.blog-header__desc { color: var(--ink-soft); max-width: 60ch; }

.cat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; padding: 0; list-style: none; }
.cat-pills a { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; font-family: var(--font-mono); padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; }
.cat-pills a.is-active, .cat-pills a:hover { border-color: var(--brand); color: var(--brand); }

.featured-post { display: grid; gap: 26px; border-bottom: 1px solid var(--line); padding: 36px 0; }
@media (min-width: 860px) { .featured-post { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.featured-post__media img { border-radius: var(--radius); aspect-ratio: 16/10; object-fit: cover; }
.featured-post__meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); display: flex; gap: 14px; margin-bottom: 10px; }
.featured-post h2 { font-size: clamp(22px, 2.8vw, 29px); }
.featured-post__excerpt { color: var(--ink-soft); }

.post-grid { display: grid; gap: 30px 26px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); padding: 36px 0; }
.post-card { position: relative; }
.post-card__media { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); display: flex; gap: 12px; margin-bottom: 6px; }
.post-card h3 { font-size: 18px; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card__excerpt { font-size: 14px; color: var(--ink-soft); }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 20px 0 56px; font-family: var(--font-mono); font-size: 13.5px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ==========================================================================
   Single blog post — premium reading experience
   ========================================================================== */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--brand); z-index: 200; transition: width 0.1s linear; }

.post-hero { padding: 44px 0 28px; border-bottom: 1px solid var(--line); }
.post-hero__cat { font-family: var(--font-mono); font-size: 13px; color: var(--brand); }
.post-hero h1 { font-size: clamp(28px, 4vw, 44px); max-width: 22ch; margin-top: 10px; }
.post-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-top: 18px; }

.post-layout { display: grid; gap: 44px; padding: 40px 0 56px; }
@media (min-width: 980px) { .post-layout { grid-template-columns: 200px 1fr; } }

.post-toc { position: sticky; top: 90px; align-self: start; display: none; }
@media (min-width: 980px) { .post-toc { display: block; } }
.post-toc__label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.post-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.post-toc li a { display: block; font-size: 13.5px; padding: 7px 0 7px 14px; color: var(--ink-soft); border-left: 2px solid transparent; margin-left: -1px; }
.post-toc li a:hover, .post-toc li a.is-active { color: var(--ink); border-color: var(--brand); }

.post-content { max-width: 68ch; font-size: 17.5px; line-height: 1.75; }
.post-content h2 { font-size: 26px; margin-top: 1.6em; }
.post-content h3 { font-size: 20px; margin-top: 1.4em; }
.post-content p { max-width: none; }
.post-content blockquote { margin: 30px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); font-style: italic; font-size: 20px; color: var(--ink-soft); }
.post-content img { border-radius: var(--radius); margin: 26px 0; }
.post-content a { border-bottom: 1px solid var(--brand); }
.post-content ul, .post-content ol { padding-left: 22px; }
.post-content code { font-family: var(--font-mono); background: var(--paper-raised); padding: 2px 6px; border-radius: 3px; }

.author-box { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 46px; max-width: 68ch; }
.author-box img { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.author-box__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.author-box__role { font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-mono); }

.related-posts { border-top: 1px solid var(--line); padding-top: 36px; margin-top: 52px; }

/* ==========================================================================
   Single IPO detail page
   ========================================================================== */
.ipo-hero { padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.ipo-hero__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ipo-hero h1 { font-size: clamp(26px, 3.6vw, 38px); }
.ipo-hero__exchange { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }

.ipo-figures { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ipo-figure { background: var(--paper-raised); padding: 16px 18px; }
.ipo-figure__label { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.ipo-figure__value { font-family: var(--font-mono); font-size: 21px; font-weight: 600; margin-top: 4px; }

.ipo-layout { display: grid; gap: 44px; padding: 40px 0 56px; }
@media (min-width: 960px) { .ipo-layout { grid-template-columns: 1fr 300px; } }

.sub-bars { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sub-bar-row { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sub-bar-row:last-child { border-bottom: none; }
.sub-bar-row__top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 13px; margin-bottom: 8px; }
.sub-bar-track { height: 6px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.sub-bar-fill { height: 100%; background: var(--brand); border-radius: 999px; }

.detail-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); padding: 20px; }
.detail-panel + .detail-panel { margin-top: 20px; }
.detail-panel h3 { font-size: 14px; font-family: var(--font-mono); color: var(--ink-soft); font-weight: 500; margin-bottom: 12px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row span:last-child { font-family: var(--font-mono); }

.ipo-content { max-width: 70ch; font-size: 17px; line-height: 1.75; }
.ipo-content h2 { font-size: 24px; margin-top: 1.6em; }
.ipo-content p { max-width: none; }
.ipo-content ul, .ipo-content ol { padding-left: 22px; }

/* ==========================================================================
   CTA / newsletter band
   ========================================================================== */
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(24px, 3.2vw, 34px); max-width: 20ch; margin: 0; }
.cta-band form { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band input[type="email"] {
	font-family: var(--font-body); font-size: 14.5px; padding: 11px 14px;
	border: 1px solid rgba(241,241,237,0.3); border-radius: var(--radius); background: transparent; color: #fff; min-width: 220px;
}
.cta-band input[type="email"]::placeholder { color: rgba(241,241,237,0.55); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(241, 241, 237, 0.85); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); padding: 52px 0 30px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-grid h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: rgba(241,241,237,0.5); margin-bottom: 14px; font-weight: 500; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14px; }
.footer-grid a:hover { color: var(--amber); }
.footer-disclaimer { font-size: 12.5px; color: rgba(241,241,237,0.55); max-width: 60ch; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(241,241,237,0.15); padding: 18px 0 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; font-family: var(--font-mono); color: rgba(241,241,237,0.5); }

/* ==========================================================================
   Generic page + 404
   ========================================================================== */
.page-content { padding: 44px 0 60px; max-width: 72ch; }
.page-content h1 { font-size: clamp(28px, 3.8vw, 40px); }
.not-found { padding: 90px 0; }
.not-found__code { font-family: var(--font-mono); color: var(--brand); font-size: 15px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
