/* PROJECT SINGLE TEMPLATE - ISOLATION WRAPPER */
#tt-product-wrapper {
    --bg-color: #F8F8F6;
    --text-color: var(--tt-ink, #253D3D);
    --heading-color: var(--tt-green, #3A5F5F);
    --meta-color: var(--tt-meta, #526666);
    --border-color: var(--tt-line, #CAD6D4);
    --accent-color: #3A5F5F;
    /* --status-color is set inline per-project via PHP based on the
       project's status field (wip/beta -> gold, completed -> green) */
    --status-color: #A07E28;
    --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "Menlo", monospace;
    --space-md: 2rem;
    --space-lg: 4rem;

    background: var(--bg-color) !important;
    color: var(--text-color) !important;
    font-family: var(--font-main) !important;
    width: 100% !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    display: block !important;
    min-height: 80vh !important;
}

/* TOP NAVIGATION */
#tt-product-wrapper .tt-sub-nav {
    padding: 1rem var(--space-md) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

#tt-product-wrapper .tt-back-link {
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    color: var(--meta-color) !important;
    display: inline-flex !important;
    align-items: center !important;
}

#tt-product-wrapper .tt-back-link:hover {
    color: var(--accent-color) !important;
}

/* GRID LAYOUT */
#tt-product-wrapper .tt-product-grid {
    display: grid !important;
    grid-template-columns: 1fr 2fr !important;
    min-height: 100% !important;
    width: 100% !important;
    border-left: 1px solid var(--border-color) !important;
    border-right: 1px solid var(--border-color) !important;
}

/* SIDEBAR */
#tt-product-wrapper .tt-sidebar {
    padding: var(--space-lg) var(--space-md) !important;
    border-right: 1px solid var(--border-color) !important;
}

#tt-product-wrapper .tt-meta-block {
    margin-bottom: 2rem !important;
}

#tt-product-wrapper .tt-label {
    font-family: var(--font-mono) !important;
    font-size: 0.8rem !important;
    color: var(--meta-color) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

#tt-product-wrapper .tt-data {
    font-size: 1rem !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: var(--font-main) !important;
}

/* EXTERNAL LINK STYLE - CLEAN ARROW */
#tt-product-wrapper .tt-ext-link {
    font-family: var(--font-mono) !important;
    font-size: 0.95rem !important;
    color: var(--tt-black, #111111) !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    transition: opacity 0.2s ease !important;
}
#tt-product-wrapper .tt-ext-link:hover {
    opacity: 0.7 !important;
    border-bottom-color: var(--accent-color) !important;
}

#tt-product-wrapper .tt-arrow {
    font-family: sans-serif !important; /* Forces standard arrow rendering */
    margin-left: 4px !important;
}

/* STATUS INDICATOR */
#tt-product-wrapper .tt-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    color: var(--status-color) !important;
    border: 1px solid var(--status-color) !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 99px !important;
}

#tt-product-wrapper .tt-dot {
    width: 8px !important;
    height: 8px !important;
    background-color: var(--status-color) !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    display: inline-block !important;
}

/* MAIN CONTENT */
#tt-product-wrapper .tt-main-content {
    padding: var(--space-lg) var(--space-md) !important;
    max-width: 70ch !important;
}

#tt-product-wrapper .tt-main-content h1 {
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin: 0 0 1.5rem 0 !important;
    line-height: 1 !important;
    color: var(--heading-color) !important;
}

#tt-product-wrapper .tt-main-content .tt-intro-lead {
    font-size: 1.3rem !important;
    line-height: 1.5 !important;
    color: var(--tt-black, #111111) !important;
    margin-bottom: var(--space-lg) !important;
    font-weight: 400 !important;
}

#tt-product-wrapper .tt-main-content h2 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin: 2rem 0 1rem 0 !important;
    color: var(--heading-color) !important;
    border-top: 1px solid var(--border-color) !important;
    padding-top: 2rem !important;
}

#tt-product-wrapper .tt-main-content p {
    margin-bottom: 1.5rem !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: var(--tt-black, #111111) !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    #tt-product-wrapper .tt-product-grid { grid-template-columns: 1fr !important; border: none !important; }
    #tt-product-wrapper .tt-sidebar { padding-bottom: 0 !important; border-right: none !important; border-bottom: 1px solid var(--border-color) !important; background-color: rgba(58,95,95,0.05) !important; }
    #tt-product-wrapper .tt-main-content { padding-top: var(--space-md) !important; }
    #tt-product-wrapper .tt-main-content h1 { font-size: 2.5rem !important; }
}

/* "Work with the team behind this" */
#tt-product-wrapper .tt-engage {
    margin-top: var(--space-lg) !important;
    padding-top: var(--space-md) !important;
    border-top: 1px solid var(--border-color) !important;
}

#tt-product-wrapper .tt-engage-note {
    font-family: var(--font-main) !important;
    color: var(--meta-color) !important;
    margin: 0 0 1.25rem 0 !important;
}

#tt-product-wrapper .tt-engage-link {
    display: inline-block !important;
    font-family: var(--font-mono) !important;
    font-size: 0.95rem !important;
    color: var(--tt-black, #111111) !important;
    background: transparent !important;
    border: 1px solid var(--tt-black, #111111) !important;
    padding: 1rem 2rem !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

#tt-product-wrapper .tt-engage-link:hover {
    background: var(--text-color) !important;
    color: var(--bg-color) !important;
}

/* 2.2: teal hover on "Work with the team behind this" and links */
#tt-product-wrapper .tt-engage-link:hover, #tt-product-wrapper .tt-engage-link:focus-visible { background: #3A5F5F !important; border-color: #3A5F5F !important; color: #FFFFFF !important; }
#tt-product-wrapper .tt-back-link:hover, #tt-product-wrapper .tt-ext-link:hover { color: #3A5F5F !important; border-color: #3A5F5F !important; }

/* 2.3: ownership line under the status ("Now part of Northwind Foods"), in the Menlo label style */
#tt-product-wrapper .tt-ownership-note {
    font-family: var(--font-mono) !important;
    font-size: 0.75rem !important;
    color: #3A5F5F !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 0.6rem 0 0 !important;
    line-height: 1.4 !important;
}

/* ==========================================================================
   2.4: stage badge, demo links, Build / Buy / Adopt (PROTOCOL 1.3)
   ========================================================================== */

/* Stage badge: square, Menlo, gold while in progress, teal when live */
#tt-product-wrapper .tt-stage {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-family: var(--font-mono) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #A07E28 !important;
    border: 1px solid #A07E28 !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 0 !important;
    line-height: 1.2 !important;
    background: transparent !important;
}
#tt-product-wrapper .tt-stage__mark { width: 7px !important; height: 7px !important; background: currentColor !important; display: inline-block !important; }
#tt-product-wrapper .tt-stage--live { color: #3A5F5F !important; border-color: #3A5F5F !important; }

/* Demo links under the title */
#tt-product-wrapper .tt-demo {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.75rem 1.5rem !important;
    margin: -0.25rem 0 2rem 0 !important;
}
#tt-product-wrapper .tt-demo__primary {
    display: inline-block !important;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    color: #FFFFFF !important;
    background: var(--tt-black, #111111) !important;
    border: 1px solid var(--tt-black, #111111) !important;
    border-radius: 0 !important;
    padding: 0.9rem 1.5rem !important;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
}
#tt-product-wrapper .tt-demo__primary:hover, #tt-product-wrapper .tt-demo__primary:focus-visible { background: #3A5F5F !important; border-color: #3A5F5F !important; color: #FFFFFF !important; }
#tt-product-wrapper .tt-demo__link {
    font-family: var(--font-mono) !important;
    font-size: 0.85rem !important;
    color: var(--tt-black, #111111) !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    padding: 0.2rem 0 !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
}
#tt-product-wrapper .tt-demo__link:hover, #tt-product-wrapper .tt-demo__link:focus-visible { color: #3A5F5F !important; border-bottom-color: #3A5F5F !important; }

/* Build / Buy / Adopt */
#tt-product-wrapper .tt-offers {
    margin-top: var(--space-lg) !important;
    padding-top: var(--space-md) !important;
    border-top: 1px solid var(--border-color) !important;
}
#tt-product-wrapper .tt-offers__intro {
    font-size: 1.05rem !important;
    line-height: 1.55 !important;
    color: var(--meta-color) !important;
    margin: 0 0 1.5rem 0 !important;
    max-width: 60ch !important;
}
#tt-product-wrapper .tt-offers__grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    border-top: 1px solid var(--border-color) !important;
    border-left: 1px solid var(--border-color) !important;
}
#tt-product-wrapper .tt-offers__grid--1 { grid-template-columns: 1fr !important; max-width: 360px !important; }
#tt-product-wrapper .tt-offer {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    padding: 1.5rem 1.25rem !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: transparent !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    box-shadow: inset 0 0 0 transparent !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}
#tt-product-wrapper .tt-offer:hover, #tt-product-wrapper .tt-offer:focus-visible {
    background: #FFFFFF !important;
    box-shadow: inset 0 3px 0 #3A5F5F !important;
    outline: none !important;
}
#tt-product-wrapper .tt-offer__title { color: var(--heading-color) !important; font-size: 1.2rem !important; font-weight: 700 !important; line-height: 1.2 !important; }
#tt-product-wrapper .tt-offer__text { font-size: 0.98rem !important; line-height: 1.5 !important; color: var(--meta-color) !important; flex: 1 !important; }
#tt-product-wrapper .tt-offer__cta {
    font-family: var(--font-mono) !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em !important;
    color: var(--tt-black, #111111) !important;
    margin-top: 0.4rem !important;
}
#tt-product-wrapper .tt-offer:hover .tt-offer__title { color: #253D3D !important; }
#tt-product-wrapper .tt-offer:hover .tt-offer__cta, #tt-product-wrapper .tt-offer:focus-visible .tt-offer__cta { color: #3A5F5F !important; }

@media (max-width: 768px) {
    #tt-product-wrapper .tt-demo { margin-bottom: 1.5rem !important; }
    #tt-product-wrapper .tt-demo__primary { width: 100% !important; text-align: center !important; }
    #tt-product-wrapper .tt-offers__grid, #tt-product-wrapper .tt-offers__grid--1 { grid-template-columns: 1fr !important; }
    #tt-product-wrapper .tt-offers { margin-top: var(--space-md) !important; }
}

/* 2.4.1: three columns: a narrow facts column, the write-up, and a sticky "Work with this project" column */
#tt-product-wrapper .tt-product-grid {
    grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) minmax(280px, 340px) !important;
    align-items: stretch !important;
}
#tt-product-wrapper .tt-sidebar { padding: var(--space-lg) 1.5rem !important; }
#tt-product-wrapper .tt-main-content { max-width: none !important; min-width: 0 !important; }
#tt-product-wrapper .tt-main-content > * { max-width: 70ch; }
#tt-product-wrapper .tt-workwith {
    border-left: 1px solid var(--border-color) !important;
    padding: var(--space-lg) 1.5rem !important;
    background: rgba(58, 95, 95, 0.035) !important;
}
#tt-product-wrapper .tt-workwith .tt-offers {
    position: sticky !important;
    top: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 0 !important;
}
#tt-product-wrapper .tt-workwith .tt-offers__intro { font-size: 0.98rem !important; margin-bottom: 1.25rem !important; }
#tt-product-wrapper .tt-workwith .tt-offers__grid,
#tt-product-wrapper .tt-workwith .tt-offers__grid--1 { grid-template-columns: 1fr !important; max-width: none !important; background: #FFFFFF !important; }
#tt-product-wrapper .tt-workwith .tt-offer { padding: 1.15rem 1.1rem !important; gap: 0.45rem !important; }
#tt-product-wrapper .tt-workwith .tt-offer__title { font-size: 1.08rem !important; }
#tt-product-wrapper .tt-workwith .tt-offer__text { font-size: 0.92rem !important; }
#tt-product-wrapper .tt-workwith .tt-offer:hover,
#tt-product-wrapper .tt-workwith .tt-offer:focus-visible { background: #F8F8F6 !important; box-shadow: inset 3px 0 0 #3A5F5F !important; }

/* Medium screens: facts + write-up side by side; the offers follow the write-up */
@media (max-width: 1100px) and (min-width: 769px) {
    #tt-product-wrapper .tt-product-grid { grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) !important; }
    #tt-product-wrapper .tt-workwith { grid-column: 2 !important; border-left: 0 !important; border-top: 1px solid var(--border-color) !important; padding: var(--space-md) !important; background: transparent !important; }
    #tt-product-wrapper .tt-workwith .tt-offers { position: static !important; max-width: 70ch !important; }
    #tt-product-wrapper .tt-workwith .tt-offers__grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }
}
/* Phones: one column */
@media (max-width: 768px) {
    #tt-product-wrapper .tt-product-grid { grid-template-columns: minmax(0, 1fr) !important; }
    #tt-product-wrapper .tt-sidebar { padding: var(--space-md) !important; }
    #tt-product-wrapper .tt-main-content { padding: var(--space-md) !important; }
    #tt-product-wrapper .tt-workwith { border-left: 0 !important; border-top: 1px solid var(--border-color) !important; padding: var(--space-md) !important; background: transparent !important; }
    #tt-product-wrapper .tt-workwith .tt-offers { position: static !important; }
}

/* 2.5: the project's square logo before the title, when it has one. */
#tt-product-wrapper .tt-main-content h1.tt-title-with-mark { display: flex !important; align-items: center !important; gap: 1rem !important; }
#tt-product-wrapper .tt-pmark { flex: 0 0 auto !important; display: inline-flex !important; width: 40px !important; height: 40px !important; border: 1px solid var(--border-color, #CAD6D4) !important; background: #FFFFFF !important; box-sizing: border-box !important; overflow: hidden !important; }
#tt-product-wrapper .tt-pmark img { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block !important; margin: 0 !important; border-radius: 0 !important; }
@media (max-width: 768px) {
    #tt-product-wrapper .tt-pmark { width: 32px !important; height: 32px !important; }
}

/* 2.8: the stage is the project's one label; a status that says more ("Completed: finished and in use") sits under it like the ownership line */
#tt-product-wrapper .tt-stage + .tt-ownership-note { margin-top: 0.75rem !important; }
#tt-product-wrapper .tt-status-note + .tt-ownership-note { margin-top: 0.35rem !important; }
