/* Concept G inner pages — blog, legal, contact, help, tools, 404. */

.g-page {
    padding: 88px 0 96px;
    color: var(--ink);
    background: #fff;
}
.g-page .g-inner,
.g-page-narrow {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
}
.g-page-narrow { width: min(680px, calc(100% - 48px)); }

.g-page-kicker {
    font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--blue); margin: 0 0 12px;
}
.g-page h1 {
    font-size: 56px; line-height: 1.05; letter-spacing: -0.04em;
    font-weight: 700; margin: 0 0 12px; color: var(--ink);
}
.g-page .g-lede {
    font-size: 19px; line-height: 1.5; color: var(--mute); margin: 0 0 36px;
    max-width: 640px;
}

.g-page .terms-container {
    max-width: none; margin: 0; padding: 0;
}
.g-page .terms-header { text-align: left; }
.g-help .terms-container.help-page-wrap { margin-top: 0; }
.g-help .help-page-wrap .help-layout { padding: 0; max-width: none; }
.g-post h1 { font-size: 48px; }

.g-prose {
    font-size: 17px; line-height: 1.7; color: #3a3a3c;
}
.g-prose h2 {
    font-size: 28px; letter-spacing: -0.03em; margin: 40px 0 12px;
    font-weight: 700; color: var(--ink);
}
.g-prose h3 {
    font-size: 20px; letter-spacing: -0.02em; margin: 28px 0 8px;
    font-weight: 600; color: var(--ink);
}
.g-prose p { margin: 0 0 16px; }
.g-prose ul, .g-prose ol { margin: 0 0 16px; padding-left: 22px; }
.g-prose li { margin: 0 0 8px; }
.g-prose a { color: var(--blue); }
.g-prose .last-updated { font-size: 14px; color: var(--mute); margin: 0 0 32px; }

/* Blog index */
.g-blog-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.g-blog-card {
    display: flex; flex-direction: column;
    background: var(--panel); border-radius: 22px; overflow: hidden;
    text-decoration: none; color: inherit;
    transition: transform 0.2s ease;
}
.g-blog-card:hover { transform: translateY(-3px); }
.g-blog-card img,
.g-blog-card .g-blog-ph {
    width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
    background: #e8e8ed;
}
.g-blog-card-body { padding: 22px 22px 24px; }
.g-blog-card h2 {
    font-size: 22px; letter-spacing: -0.025em; margin: 0 0 8px;
    font-weight: 700; color: var(--ink); line-height: 1.25;
}
.g-blog-card .g-meta { font-size: 13px; color: var(--mute); margin: 0 0 10px; }
.g-blog-card p {
    font-size: 15px; color: var(--mute); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.g-blog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.g-blog-tag {
    font-size: 12px; font-weight: 500; color: var(--ink);
    background: #fff; border-radius: 980px; padding: 4px 10px;
}
.g-empty { text-align: center; padding: 64px 16px; color: var(--mute); }
.g-empty h2 { color: var(--ink); margin: 0 0 8px; font-size: 28px; }

/* Blog post */
.g-post { padding-bottom: 0; }
.g-post-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 15px; font-weight: 500; color: var(--blue); text-decoration: none;
    margin-bottom: 28px;
}
.g-post-back:hover { text-decoration: underline; }
.g-post-hero {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 22px; margin: 8px 0 36px; display: block;
}
.g-post-body {
    font-size: 18px; line-height: 1.75; color: #3a3a3c;
}
.g-post-body h1, .g-post-body h2, .g-post-body h3, .g-post-body h4 {
    color: var(--ink); letter-spacing: -0.03em; font-weight: 700;
    margin: 1.6em 0 0.5em; line-height: 1.2;
}
.g-post-body h2 { font-size: 32px; }
.g-post-body h3 { font-size: 24px; }
.g-post-body p { margin: 0 0 1.15em; }
.g-post-body a { color: var(--blue); }
.g-post-body img {
    max-width: 100%; height: auto; border-radius: 16px; margin: 28px 0; display: block;
}
.g-post-body blockquote {
    margin: 28px 0; padding: 8px 0 8px 22px;
    border-left: 3px solid var(--blue);
    color: var(--mute); font-size: 22px; line-height: 1.45;
    letter-spacing: -0.02em; font-style: italic;
}
.g-post-body pre {
    background: var(--panel); border-radius: 14px; padding: 16px; overflow-x: auto;
}
.g-post-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em; background: var(--panel); padding: 0.12em 0.4em; border-radius: 6px;
}
.g-post-body pre code { background: none; padding: 0; }
.g-post-related {
    background: var(--panel); padding: 88px 0;
    margin-top: 72px;
}
.g-post-related h2 {
    font-size: 32px; letter-spacing: -0.035em; margin: 0 0 28px; text-align: center;
}

.g-cta-band {
    text-align: center; padding: 96px 24px 100px;
    background: linear-gradient(180deg, #fff 0%, #f3f7ff 100%);
}
.g-cta-band h2 {
    font-size: 48px; line-height: 1.08; letter-spacing: -0.04em;
    font-weight: 700; margin: 0 auto 24px;
}
.g-cta-band .g-hero-actions { justify-content: center; }

/* Contact */
.g-form {
    max-width: 560px;
}
.g-form .form-group { margin: 0 0 16px; }
.g-form label {
    display: block; font-size: 13px; font-weight: 600; color: var(--mute);
    margin: 0 0 6px;
}
.g-form input,
.g-form textarea {
    width: 100%; border: 1px solid rgba(0,0,0,0.12); border-radius: 12px;
    padding: 12px 14px; font: 16px/1.4 Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink); background: #fff;
}
.g-form input:focus,
.g-form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.g-form .g-btn { margin-top: 8px; }
.g-form .alert {
    border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 15px;
}
.g-form .alert-success { background: #e8f8ee; color: #0d6a32; }
.g-form .alert-danger { background: #fdecec; color: #b42318; }

/* Help */
.g-help .help-layout {
    display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start;
}
.g-help .help-sidebar {
    position: sticky; top: 72px;
    background: var(--panel); border-radius: 18px; padding: 18px 16px;
}
.g-help .help-sidebar-label {
    font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--mute); margin: 0 0 10px;
}
.g-help .help-toc-list { list-style: none; padding: 0; margin: 0; }
.g-help .help-toc-list li { margin: 0; }
.g-help .help-toc a {
    display: block; font-size: 13px; color: var(--ink); text-decoration: none;
    padding: 6px 8px; border-radius: 8px;
}
.g-help .help-toc a:hover { color: var(--blue); background: #fff; }
.g-help .help-toc a::after { content: none; }
.g-help .help-toc-dropdown { display: none; }
.g-help .terms-header h1 { font-size: 44px; margin-bottom: 8px; }
.g-help .help-doc-img { max-width: 100%; border-radius: 14px; margin: 16px 0; }
.g-help .container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

/* Tools */
.g-home .tool-page {
    margin-top: 0; padding: 88px 0 96px; background: #fff;
}
.g-home .tool-page-inner { width: min(var(--max), calc(100% - 48px)); padding: 0; }
.g-home .tool-kicker {
    color: var(--blue); text-transform: none; letter-spacing: 0; font-size: 13px;
    font-weight: 600;
}
.g-home .tool-header h1 {
    font-size: 44px; letter-spacing: -0.035em; color: var(--ink); font-weight: 700;
}
.g-home .tool-header p { color: var(--mute); font-size: 17px; }
.g-home .tool-card {
    background: var(--panel); border: none; border-radius: 22px; padding: 24px;
}
.g-home .tool-card h2 { color: var(--ink); letter-spacing: -0.02em; }
.g-home .tool-form-grid input,
.g-home .tool-form-grid select,
.g-home .tool-block-label input,
.g-home .tool-block-label textarea,
.g-home .tool-card-output textarea {
    border-radius: 12px; border-color: rgba(0,0,0,0.12);
}
.g-home .tool-actions .btn,
.g-home .tool-page .btn {
    border-radius: 980px; background: var(--blue); color: #fff; border: none;
    padding: 11px 22px; font-weight: 500;
}
.g-home .tool-actions .btn:hover { background: var(--ap-blue-hover); }

/* 404 */
.g-404 { text-align: center; padding: 140px 24px 120px; }
.g-404 h1 { font-size: 72px; margin: 0 0 12px; }
.g-404 p { color: var(--mute); font-size: 19px; margin: 0 0 28px; }
.g-404 .g-hero-actions { justify-content: center; }

@media (max-width: 980px) {
    .g-page h1, .g-help .terms-header h1, .g-home .tool-header h1, .g-cta-band h2 { font-size: 36px; }
    .g-blog-grid { grid-template-columns: 1fr; }
    .g-help .help-layout { grid-template-columns: 1fr; }
    .g-help .help-sidebar { position: static; }
    .g-help .help-toc-list-desktop { display: none; }
    .g-help .help-toc-dropdown { display: block; }
}
@media (max-width: 430px) {
    .g-page, .g-home .tool-page { padding: 72px 0 64px; }
    .g-page .g-inner, .g-page-narrow, .g-home .tool-page-inner { width: calc(100% - 32px); }
    .g-404 h1 { font-size: 44px; }
}
