/* Public template gallery: /templates and /templates/{key}. Builds on landing-site.css; colours are --ory-* tokens. */

/* ---------- hub: category chips ---------- */
.lp .tg-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.lp .tg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--ory-radius-pill);
    border: 1px solid var(--ory-border);
    background: var(--ory-surface);
    color: var(--ory-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

    .lp .tg-chip span {
        color: var(--ory-muted);
        font-weight: 500;
    }

    .lp .tg-chip:hover {
        border-color: var(--ory-accent-border);
        color: var(--ory-accent);
        text-decoration: none;
    }

.lp .tg-category {
    scroll-margin-top: 80px;
}

.lp .tg-category-title {
    margin-bottom: 24px;
    font-size: clamp(24px, 3vw, 30px);
}

/* ---------- cards ---------- */
.lp .tg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lp .tg-card h3 {
    margin: 16px 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ory-ink);
}

.lp .tg-card p {
    margin: 0;
    color: var(--ory-muted);
}

.lp .tg-card .lp-icon i {
    font-size: 20px;
}

.lp .tg-card-meta {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ory-faint);
}

/* ---------- detail: field list ---------- */
.lp .tg-fields {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    border: 1px solid var(--ory-border);
    border-radius: var(--ory-radius-xl);
    background: var(--ory-surface);
    overflow: hidden;
}

.lp .tg-field {
    display: flex;
    gap: 16px;
    padding: 18px 22px;
    border-top: 1px solid var(--ory-hairline);
}

    .lp .tg-field:first-child {
        border-top: 0;
    }

    .lp .tg-field.is-note {
        background: var(--ory-canvas);
    }

    .lp .tg-field h3 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: var(--ory-ink);
    }

    .lp .tg-field p {
        margin: 6px 0 0;
        color: var(--ory-muted);
        line-height: 1.55;
    }

.lp .tg-field-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--ory-radius-md);
    background: var(--ory-accent-soft);
    color: var(--ory-accent);
    font-size: 18px;
}

.lp .tg-field-num {
    color: var(--ory-faint);
    font-weight: 500;
}

.lp .tg-field-quote {
    font-style: italic;
}

.lp .tg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

    .lp .tg-options li {
        padding: 3px 10px;
        border-radius: var(--ory-radius-pill);
        border: 1px solid var(--ory-border);
        font-size: 13px;
        color: var(--ory-text);
    }

/* ---------- detail: hero phone preview ---------- */
.lp .tg-phone {
    max-width: 340px;
    margin: 0 auto;
    padding: 18px;
    border: 1px solid var(--ory-border);
    border-radius: 28px;
    background: var(--ory-surface);
    box-shadow: var(--ory-shadow-lg);
}

.lp .tg-phone-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--ory-hairline);
    font-weight: 700;
    color: var(--ory-ink);
}

    .lp .tg-phone-head i {
        color: var(--ory-accent);
        font-size: 20px;
    }

.lp .tg-phone-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
}

.lp .tg-phone-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ory-text);
}

.lp .tg-phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--ory-border);
    border-radius: var(--ory-radius-md);
    background: var(--ory-canvas);
    font-size: 13px;
    color: var(--ory-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .lp .tg-phone-input i {
        color: var(--ory-faint);
    }

.lp .tg-phone-submit {
    display: block;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--ory-radius-md);
    background: var(--ory-accent);
    color: var(--ory-on-accent);
    text-align: center;
    font-weight: 600;
}

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

@media (max-width: 575.98px) {
    .lp .tg-grid { grid-template-columns: 1fr; }
    .lp .tg-field { padding: 16px; gap: 12px; }
}
