/* =============================================
   ppuzzle.works — Forge Workshop Stylesheet
   Palette:
     #18181b  Forge Dark (primary bg)
     #27272a  Output Gray (footer, secondary bg)
     #3f3f46  Border Zinc (block borders)
     #fafafa  Tool White (primary text)
     #ef4444  Active Red (active indicators, accent)
     #3b82f6  Analysis Blue (analysis indicators, links)
     #71717a  Reference Zinc (secondary text, ref indicators)
     #a1a1aa  Meta Gray (timestamps, versions)
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #18181b;
    color: #fafafa;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================
   FORGE HEADER
   ============================================= */

.forge-header {
    background: #18181b;
    padding: 64px 0 48px 0;
    border-bottom: 2px solid #3f3f46;
}

.forge-header-inner {
    padding-left: 10%;
    padding-right: 5%;
    max-width: 1400px;
}

.forge-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    color: #fafafa;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.forge-accent-bar {
    width: 120px;
    height: 6px;
    background: #ef4444;
    margin-bottom: 20px;
}

.forge-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #71717a;
    max-width: 480px;
    line-height: 1.6;
}

/* =============================================
   TOOL GRID WRAPPER
   ============================================= */

.tool-grid-wrapper {
    flex: 1;
    padding: 24px 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   TOOL BLOCKS
   ============================================= */

.tool-block {
    background: #18181b;
    border: 2px solid #3f3f46;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Left-border indicators by category */
.tool-block.active {
    border-left: 4px solid #ef4444;
}

.tool-block.reference {
    border-left: 4px solid #71717a;
}

.tool-block.analysis {
    border-left: 4px solid #3b82f6;
}

/* Spanning blocks */
.span-2 {
    grid-column: span 2;
}

/* Block label (monospace, uppercase) */
.block-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a1a1aa;
    margin-bottom: 12px;
}

/* Block title */
.block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fafafa;
    line-height: 1.25;
    margin-bottom: 10px;
}

/* Block body text */
.block-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #71717a;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 16px;
}

/* Block meta row */
.block-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.meta-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #71717a;
    letter-spacing: 0.03em;
}

/* Status indicators */
.status-active {
    color: #ef4444;
    font-weight: 500;
}

/* Block action link */
.block-link {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #fafafa;
    text-decoration: none;
    border: 1px solid #3f3f46;
    padding: 6px 14px;
    margin-top: auto;
    align-self: flex-start;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tool-block.active .block-link:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #18181b;
}

.tool-block.reference .block-link:hover {
    background: #71717a;
    border-color: #71717a;
    color: #18181b;
}

.tool-block.analysis .block-link:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #18181b;
}

/* =============================================
   OUTPUT STRIP (FOOTER)
   ============================================= */

.output-strip {
    background: #27272a;
    padding: 16px 24px;
    border-top: 2px solid #3f3f46;
    margin-top: 24px;
}

.output-strip-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #a1a1aa;
}

.output-item {
    white-space: nowrap;
}

.output-sep {
    color: #3f3f46;
    user-select: none;
}

.output-right {
    margin-left: auto;
    color: #71717a;
}

/* =============================================
   RESPONSIVE LAYOUT
   ============================================= */

@media (max-width: 900px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .forge-header-inner {
        padding-left: 6%;
    }
}

@media (max-width: 600px) {
    .tool-grid {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }

    .span-2 {
        grid-column: span 1;
    }

    .forge-header {
        padding: 40px 0 32px 0;
    }

    .forge-header-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .output-strip-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .output-right {
        margin-left: 0;
    }

    .output-sep {
        display: none;
    }
}
