/**
 * TP-15 homepage redesign (design option 1a).
 *
 * Layered on top of the plugin's existing --tp-* brand tokens (kept per the
 * product decision: --tp-primary #3c7ae5 / --tp-accent #22b573). Design-specific
 * neutrals, surfaces, radii and shadows are declared here as --tph-* so the
 * homepage can be pixel-close to the handoff without disturbing the dashboard.
 *
 * Scope: only inside .tp-home so nothing here leaks into other shortcodes.
 */

.tp-home {
    /* Brand (from existing plugin tokens) */
    --tph-blue: var(--tp-primary, #3c7ae5);
    --tph-blue-deep: #0a3d7a;
    --tph-green: var(--tp-accent, #22b573);
    --tph-green-hover: #1c9d63;

    /* Ink / text ramp */
    --tph-ink: #0b1b2b;
    --tph-body: #46617f;
    --tph-muted: #5c748f;
    --tph-muted-2: #6b829b;
    --tph-muted-3: #7d8fa3;
    --tph-disabled: #b0bcc9;
    --tph-amber: #c9770a;
    --tph-amber-text: #7a5418;

    /* Surfaces */
    --tph-surface: #ffffff;
    --tph-field: #fbfdff;
    --tph-alias: #fafcff;
    --tph-alt: #f7fafd;
    --tph-blue-tint: #eef6ff;
    --tph-blue-tint-2: #e8f2ff;
    --tph-green-tint: #f4fbf6;

    /* Borders */
    --tph-border: #e3e9f2;
    --tph-border-row: #eef2f7;
    --tph-border-blue: #d6e6fa;
    --tph-border-field: #cfdcec;
    --tph-border-green: #d8ecdd;
    --tph-border-amber: #ffe0b2;
    --tph-dashed: #d9e5f3;

    /* Type */
    --tph-sans: 'Manrope', 'Poppins', 'Segoe UI', sans-serif;
    --tph-mono: 'JetBrains Mono', 'SFMono-Regular', 'Menlo', monospace;

    /* Shadows */
    --tph-card-shadow: 0 18px 44px -20px rgba(10, 61, 122, .45), 0 2px 6px rgba(10, 61, 122, .06);
    --tph-green-shadow: 0 6px 16px -6px rgba(47, 158, 68, .8);
    --tph-chip-shadow: 0 4px 12px -6px rgba(18, 102, 214, .7);

    font-family: var(--tph-sans);
    color: var(--tph-ink);
    background: none;
    border-radius: 0;
    max-width: 1040px;   /* single responsive container — every block shares this width */
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 40px;
    -webkit-font-smoothing: antialiased;
}

/* Nested shortcode wrapper (.tp-home.tp-home-tool inside the page .tp-home):
   don't re-apply the container width/padding. */
.tp-home .tp-home { max-width: none; width: 100%; margin: 0; padding: 0; }

.tp-home *,
.tp-home *::before,
.tp-home *::after { box-sizing: border-box; }

.tp-mono-inline { font-family: var(--tph-mono); font-size: 15px; color: var(--tph-muted); }
.tp-center { text-align: center; }
.d-none { display: none !important; }

/* ============================ HERO ============================ */
.tp-hero {
    margin: 0 0 24px;           /* fills the shared container; same width as the sections */
    padding: 0px 40px;
    background: linear-gradient(180deg, #f2f8ff 0%, #e2effd 55%, #f7fafd 100%);
    border: 1px solid var(--tph-border);
    border-radius: 16px;        /* round corners */
}
.tp-hero-inner { max-width: none; margin: 0; padding: 0; }

.tp-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 99px;
    background: #fff; border: 1px solid #cfe3fb;
    font-weight: 600; font-size: 12px; color: var(--tph-blue-deep);
    margin: 0 auto 18px; text-align: center;
}
.tp-hero-inner { display: flex; flex-direction: column; align-items: center; }

.tp-h1 {
    text-align: center; margin: 0;
    font-weight: 800; font-size: 54px; line-height: 1.05;
    letter-spacing: -.035em; color: var(--tph-ink); text-wrap: balance;
}
.tp-h1-accent { color: var(--tph-blue); }

.tp-hero-sub {
    max-width: 100%; margin: 16px auto 0; text-align: center;
    font-weight: 400; font-size: 17.5px; line-height: 1.6;
    color: var(--tph-body); text-wrap: pretty;
}

/* TP-15: the shortcode now renders the tool ONLY (hero copy + sections live in
   the page). Center + constrain it whether the page nests it inside .tp-hero or
   drops it in standalone. The .tp-tool-card 34px top margin supplies the gap. */
.tp-home-tool { width: 100%; max-width: 1000px; margin-left: auto; margin-right: auto; }

/* -------------------------- TOOL CARD -------------------------- */
.tp-tool-card {
    width: 100%; margin-top: 0;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    text-align: left;
}
.tp-shortener-form { margin: 0; }

.tp-field-label {
    display: block; font-weight: 700; font-size: 11px; letter-spacing: .09em;
    text-transform: uppercase; color: var(--tph-muted); margin-bottom: 7px;
}
/* Validation message sits directly under the URL input — all states (error / valid / redirect). */
#tp-url-validation-message { padding: 0; margin-top: 8px; text-align: left; }
/* TP-363: the warning state uses a readable DARK ORANGE (the theme's yellow
   text-warning was hard to see). !important beats the utility class. */
#tp-url-validation-message.warning-message,
#tp-url-validation-message.text-warning { color: #c2410c !important; }
/* Permanent-redirect: the destination is a GREENISH new-tab link. */
a.tp-redirect-target { font-weight: 700; text-decoration: underline; word-break: break-all; color: var(--tph-green); }
a.tp-redirect-target:hover { color: var(--tph-green-hover); }
.tp-redirect-dead { font-weight: 700; color: #c0392b; }
/* "Apply this destination" is a small green pill button to highlight the action. */
#tp-url-validation-message .tp-replace-url-link {
    display: inline-flex; align-items: center; gap: 5px; margin-left: 4px;
    padding: 3px 11px; border-radius: 999px; background: var(--tph-green);
    color: #fff !important; font-weight: 700; font-size: 12px; text-decoration: none;
    white-space: nowrap; cursor: pointer; transition: background .16s ease;
}
#tp-url-validation-message .tp-replace-url-link:hover { background: var(--tph-green-hover); color: #fff !important; }

.tp-tool-row {
    display: grid; gap: 14px; align-items: end;
    padding: 26px 26px 22px;
}
.tp-field-block { min-width: 0; }

.tp-url-field {
    display: flex; align-items: center; gap: 10px;
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: .75rem;
    padding: 5px;
    box-shadow: 0 4px 12px -8px rgba(30, 79, 159, .15);
    transition: border-color .2s ease, box-shadow .2s ease;
}
#tp-destination { border: none; }
/* No focus border/ring on the active input — keep the field's default look. */
.tp-url-field:focus-within { border-color: var(--tp-border); box-shadow: 0 4px 12px -8px rgba(30, 79, 159, .15); }
#tp-destination:focus, #tp-destination:focus-visible { outline: none; border: none; box-shadow: none; }
.tp-status-dot { display: none; } /* no green dot */
.tp-url-field.is-invalid { border-color: #d64545; }
.tp-url-field.is-invalid .tp-status-dot { background: #d64545; }

/* TP-15: block inner-containers fill their group (fixes the editor 620px cap; no
   effect needed on the front end but harmless there). */
.tp-home .wp-block-group__inner-container { width: 100%; margin: 0; }

/* Dashboard input border + shadow on the destination field (explicit by ID). */
#tp-destination-input-visual {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: .75rem;
    box-shadow: 0 4px 12px -8px rgba(30, 79, 159, .15);
}
.tp-url-input {
    flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none;
    font-weight: 500; font-size: 16px; color: var(--tph-ink); font-family: var(--tph-sans);
}
.tp-paste-btn { border: 0; background: transparent; color: var(--tp-accent); cursor: pointer; padding: 4px 4px 4px 12px; font-size: 20px; }
.tp-paste-btn:hover { color: var(--tph-blue); }
.button:hover { background: none; }

/* Create action — a bigger text-coloured arrow on transparent bg (no button). */
.tp-create-btn {
    flex: 0 0 auto; border: 0; background: transparent; box-shadow: none;
    color: var(--tp-accent); font-size: 24px; line-height: 1; cursor: pointer;
    padding: 6px 8px; display: inline-flex; align-items: center; justify-content: center;
    transition: color .2s ease, transform .1s ease;
}
.tp-create-btn:hover { color: var(--tph-blue); }
/* TP-357: the ↴ is greyed + not-clickable until the destination is valid. */
.tp-create-btn:disabled, .tp-create-btn:disabled:hover { color: #b7c3d1; cursor: not-allowed; opacity: 1; }
/* TP-357/TP-359: the keyword-field "Deploy" (create) icon matches the ↴ — 24px,
   green by default, blue on hover, no background. Two-class selectors so they beat
   .tp-regen-btn (15px / blue) regardless of source order. */
.tp-regen-btn.tp-keyword-save-btn { font-size: 24px; color: var(--tp-accent); background: transparent; box-shadow: none; }
.tp-regen-btn.tp-keyword-save-btn:hover { color: var(--tph-blue); }
.tp-keyword-save-btn:disabled, .tp-keyword-save-btn:disabled:hover { color: #b7c3d1; cursor: not-allowed; opacity: 1; }
/* Kill the theme's blue button hover/focus background (beats Neve's button:hover by ID). */
#tp-submit-btn, #tp-submit-btn:hover, #tp-submit-btn:focus, #tp-submit-btn:active,
#tp-suggest-btn, #tp-suggest-btn:hover, #tp-suggest-btn:focus, #tp-suggest-btn:active,
#tp-paste-btn, #tp-paste-btn:hover, #tp-paste-btn:focus, #tp-paste-btn:active { background: transparent; box-shadow: none; }

.tp-inline-msg { padding: 0 26px 12px; font-size: 12.5px; font-weight: 600; text-align: right; }
.tp-inline-msg.is-error { color: #c0392b; }
.tp-inline-msg.is-ok { color: var(--tph-green); }
.tp-rules-hint { color: var(--tph-muted); font-weight: 500; }
/* TP-356: rules hint sits next to the "Your keyword" label, not at the bottom. */
.tp-keyword-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-keyword-rules-inline { padding: 0; font-size: 11.5px; font-weight: 500; color: var(--tph-muted); text-align: right; }
/* TP-354: the keyword-availability notice (only the "taken" case is shown now)
   sits on the LEFT under the field, not right like the rules hint. */
#tp-custom-key-message { text-align: left; }

/* Thinking */
.tp-thinking { display: flex; align-items: center; gap: 10px; padding: 0 26px 24px; font-weight: 600; font-size: 13px; color: var(--tph-blue); }
.tp-thinking-glyph { animation: tppulse 1s infinite; }
@keyframes tppulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* Suggestions */
.tp-suggestions { padding: 0 26px 24px; animation: tpin .35s ease; }
@keyframes tpin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.tp-suggestions-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.tp-more-keywords { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--tp-border); background: #fff; color: var(--tph-blue-deep); font: inherit; font-weight: 700; font-size: 12.5px; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.tp-more-keywords:hover { border-color: var(--tph-blue); background: var(--tph-blue-tint); }
/* Keep the label visible — beats Neve's white-text button:hover by ID. */
#tp-more-keywords, #tp-more-keywords:hover, #tp-more-keywords:focus, #tp-more-keywords:active { color: var(--tph-blue-deep); }
.tp-more-keywords i { font-size: 12px; transition: transform .5s ease; }
.tp-more-keywords.is-spinning i { transform: rotate(360deg); }
.tp-suggestions-hint { display: block; font-weight: 500; font-size: 12px; color: var(--tph-muted); margin: 10px 2px 0; }
/* Guest 'Add alias' → sign-in invitation shown under the keyword field. */
.tp-alias-invite { margin: 10px 2px 0; padding: 10px 14px; border: 1px solid var(--tp-border); border-radius: 10px; background: var(--tph-blue-tint); color: var(--tph-blue-deep); font-size: 13px; font-weight: 600; }
.tp-alias-invite a { color: var(--tph-blue-deep); font-weight: 700; text-decoration: underline; }

.tp-chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tp-chip {
    text-align: left; padding: 14px 15px; border-radius: 11px; cursor: pointer;
    border: 1.5px solid #dbe4ee; background: #fff; color: #3d5169; transition: all .14s;
    font-family: var(--tph-sans);
}
.tp-chip:hover { border-color: var(--tph-blue); }
.tp-chip-slug { display: block; font-family: var(--tph-mono); font-weight: 700; font-size: 15px; letter-spacing: -.01em; margin-bottom: 5px; }
.tp-chip-label { display: flex; gap: 6px; font-weight: 600; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .72; }
.tp-chip.is-selected { border: 2px solid var(--tph-blue); background: var(--tph-blue-tint); color: var(--tph-blue-deep); box-shadow: var(--tph-chip-shadow); }
.tp-chip.is-taken { border-color: #eceff3; background: #f7f9fb; color: var(--tph-disabled); text-decoration: line-through; cursor: not-allowed; }

/* Keyword row */
/* TP-356: keyword field full-width, "Add alias" on its own line below it. */
.tp-keyword-row {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px;
    margin-top: 18px; padding-top: 16px;
}
.tp-keyword-row .tp-field-block { width: 100%; }
.tp-add-alias-btn { align-self: flex-start; }
.tp-keyword-field {
    display: flex; align-items: center; height: 50px; overflow: hidden;
    border: 1.5px solid var(--tph-border-field); border-radius: 10px; background: #fff;
}
.tp-keyword-prefix { padding: 0 2px 0 14px; font-family: var(--tph-mono); font-weight: 500; font-size: 15px; color: var(--tph-muted-2); white-space: nowrap; }
.tp-keyword-input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--tph-mono); font-weight: 700; font-size: 15px; color: var(--tph-ink); }
/* Keep the keyword input flush inside its field wrapper: drop any theme-added
   border and left padding so the text sits right after the domain prefix, and
   match the prefix's metrics. Neve forces 15.68px + 10px vertical padding on
   form inputs, which knocked the keyword text out of vertical line with the
   "dev.trfc.link/" prefix (15px, no padding). */
#tp-custom-key { border: 0; padding-left: 0; padding-top: 0; padding-bottom: 0; font-size: 15px; line-height: 24px; }
/* No focus box around the keyword input, even when active: kill Neve's
   input:read-write:focus glow (box-shadow). ID+:focus beats the theme. */
#tp-custom-key:focus, #tp-custom-key:focus-visible { box-shadow: none; outline: none; border: 0; }
/* One font for every tool input: mono, matching the domain prefix + short code.
   :not([type=checkbox/radio]) lifts specificity above Neve's `form input:
   read-write` (Arial) and also covers locked/readonly fields like #tp-destination
   that :read-write would skip. */
.tp-home form input:not([type=checkbox]):not([type=radio]),
.tp-home form textarea { font-family: var(--tph-mono); }
.tp-key-status { padding: 0 12px; font-weight: 600; font-size: 12px; white-space: nowrap; color: var(--tph-green); }
.tp-key-status.is-taken { color: #c0392b; }
.tp-regen-btn { border: 0; background: transparent; color: var(--tph-blue); cursor: pointer; padding: 0 12px; font-size: 15px; }
/* TP-354: mirror the "More keywords" pill style. */
.tp-add-alias-btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--tp-border); background: #fff; color: var(--tph-blue-deep);
    font-family: var(--tph-sans); font-weight: 700; font-size: 12.5px;
    padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
    transition: border-color .16s ease, background .16s ease;
}
.tp-add-alias-btn:hover { border-color: var(--tph-blue); background: var(--tph-blue-tint); }
.tp-add-alias-btn i { font-size: 12px; }

.tp-alias-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.tp-alias-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--tph-border); border-radius: 9px; background: var(--tph-alias); }
.tp-alias-prefix { font-family: var(--tph-mono); font-weight: 500; font-size: 13px; color: var(--tph-muted); }
.tp-alias-input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--tph-mono); font-weight: 700; font-size: 13px; color: var(--tph-ink); }
.tp-alias-remove { border: 0; background: transparent; color: #9db0c4; font-weight: 700; font-size: 15px; cursor: pointer; }

/* Created */
.tp-created {
    padding: 22px 24px 24px; background: linear-gradient(180deg, #f3faf5, #ffffff);
    border: 1px solid var(--tph-border-green); border-radius: 14px; animation: tpin .35s ease;
}
/* TP-360: revamped created/result state. */
.tp-result-grid { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: start; }
.tp-result-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tp-created-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--tph-green); }
.tp-live-dot { font-size: 7px; animation: tp-pulse 1.8s ease-in-out infinite; }
@keyframes tp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.tp-created-link { font-family: var(--tph-mono); font-weight: 800; font-size: 24px; letter-spacing: -.03em; color: var(--tph-blue-deep); text-decoration: none; word-break: break-all; }
.tp-created-link:hover { text-decoration: underline; }

/* Actions: copy link / open link / copy QR / scan QR */
.tp-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-action {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
    border: 1.5px solid var(--tph-border-field); border-radius: 10px; background: #fff;
    color: var(--tph-blue-deep); font-family: var(--tph-sans); font-weight: 700; font-size: 12.5px;
    cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .1s ease;
}
.tp-action i { font-size: 13px; color: var(--tph-blue); }
.tp-action:hover { border-color: var(--tph-blue); background: var(--tph-blue-tint); }
.tp-action:active { transform: translateY(1px); }

/* Live stats — one prominent strip: clicks · scans · expiry countdown */
.tp-result-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-stat-pill {
    display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 16px;
    border-radius: 999px; background: var(--tph-blue-tint); border: 1px solid #dbe8fb;
}
.tp-stat-pill i { font-size: 12px; align-self: center; color: var(--tph-blue); }
.tp-stat-num { font-weight: 800; font-size: 19px; line-height: 1; color: var(--tph-ink); font-variant-numeric: tabular-nums; }
.tp-stat-cap { font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--tph-muted-3); }
.tp-stat-expiry-pill { background: #fff6e9; border-color: var(--tph-border-amber); }
.tp-stat-expiry-pill i { color: var(--tph-amber); }
.tp-stat-expiry { color: var(--tph-amber); font-family: var(--tph-mono); font-size: 17px; }
.tp-stat-expiry.is-urgent { color: #d64545; }
.tp-stat-expiry-pill.is-urgent { background: #fdecec; border-color: #f3c3c3; }

.tp-try-it { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; color: var(--tph-blue-deep); }
.tp-join-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--tph-border-amber); border-radius: 11px; background: #fff8ee; }
.tp-join-copy { font-weight: 600; font-size: 13.5px; color: var(--tph-amber-text); }
.tp-join-btn { padding: 8px 14px; border: 1.5px solid #dbe4ee; border-radius: 8px; background: #fff; font-weight: 700; font-size: 12.5px; color: var(--tph-ink); cursor: pointer; font-family: var(--tph-sans); }
.tp-join-btn:hover { border-color: var(--tph-blue); }
.tp-save-link-reminder { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--tph-blue); }
.tp-save-link-reminder:hover { text-decoration: underline; }

/* Aside: QR + thumbnail in the SAME row. */
.tp-result-aside { display: flex; }
.tp-qr-and-preview-container { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.tp-qr-card { padding: 5px; background: #fff; border: 1px solid #d8e4f0; border-radius: 10px; align-self: flex-start; }
.tp-qr-code-container { line-height: 0; }
/* QR sizing lives in the .tp-home block below (overrides frontend.css defaults). */
/* Thumbnail: a bigger, uncropped rectangular preview (a page render is landscape;
   show the whole frame, don't cover-crop it). Reveals with a scale+fade when the
   async preview loads. */
.tp-screenshot-card { width: 260px; max-width: 100%; }
.tp-screenshot-card .tp-screenshot-img { display: block; width: 100%; height: auto;
    opacity: 0; transform: scale(.96); transform-origin: center;
    transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1);
    border: 1px solid #e3e9f2; border-radius: 10px; }
.tp-screenshot-card .tp-screenshot-preview.tp-screenshot-loaded .tp-screenshot-img { opacity: 1; transform: scale(1); }

.tp-loading { text-align: center; padding: 24px 26px; }
.tp-loading-text { margin-top: 12px; color: var(--tph-muted); }
.tp-spinner { color: var(--tph-blue); }
.tp-error-message { margin: 0 26px 24px; padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #c0392b; font-weight: 600; font-size: 14px; }
.tp-error-message.is-info { background: #eef4fe; color: var(--tp-primary, #3c7ae5); }
.tp-error-message.is-info a { color: inherit; }

/* Returning-visitor line */
.tp-recent-links { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-weight: 500; font-size: 13px; color: var(--tph-muted-2); }
.tp-recent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tph-green); }
.tp-recent-link { font-weight: 700; color: var(--tph-blue); text-decoration: none; }

/* ============================ SECTIONS ============================ */
.tp-section { padding: 64px 36px; }
.tp-section-inner { max-width: 1000px; margin: 0 auto; }
.tp-h2 { font-weight: 800; font-size: 34px; line-height: 1.15; letter-spacing: -.03em; color: var(--tph-ink); margin: 0 0 6px; }
.tp-h2-cta { font-size: 38px; line-height: 1.12; }
.tp-h2-light { color: #fff; }
.tp-section-sub { font-weight: 400; font-size: 16px; line-height: 1.6; color: var(--tph-muted); margin: 0 0 40px; }
.tp-center .tp-section-sub, .tp-section-sub.tp-center { margin-left: auto; margin-right: auto; }

/* Steps */
.tp-section-steps { background: #fff; }
.tp-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tp-step-card { padding: 26px; border: 1px solid var(--tph-border); border-radius: 14px; background: var(--tph-field); }
.tp-step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--tph-blue-tint-2); font-weight: 800; font-size: 15px; color: var(--tph-blue); margin-bottom: 16px; }
.tp-step-h { font-weight: 700; font-size: 18px; color: var(--tph-ink); margin: 0 0 8px; }
.tp-step-b { font-weight: 400; font-size: 14.5px; line-height: 1.6; color: var(--tph-muted); margin: 0; }

/* Examples table */
.tp-section-examples { background: var(--tph-alt); border-top: 1px solid var(--tph-border); border-bottom: 1px solid var(--tph-border); }
.tp-table { display: grid; gap: 1px; background: var(--tph-border); border: 1px solid var(--tph-border); border-radius: 14px; overflow: hidden; }
.tp-table-examples .tp-table-head, .tp-table-examples .tp-tr { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 1px; }
.tp-table-head { display: contents; }
.tp-th { padding: 12px 20px; background: #eef3f9; font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--tph-muted); }
.tp-tr { display: contents; }
.tp-td { padding: 15px 20px; background: #fff; font-size: 14px; }
.tp-td-random { font-family: var(--tph-mono); font-weight: 500; color: var(--tph-muted-3); text-decoration: line-through; }
.tp-td-tp { font-family: var(--tph-mono); font-weight: 700; color: var(--tph-blue-deep); }
.tp-td-dest { font-weight: 400; font-size: 13.5px; color: var(--tph-muted); }

/* Comparison table */
.tp-section-compare { background: #fff; }
.tp-compare { border: 1px solid var(--tph-border); border-radius: 14px; overflow: hidden; }
.tp-compare-head, .tp-cmp-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); }
.tp-compare-head { background: var(--tph-blue-deep); }
.tp-compare-head .tp-cmp-cell { text-align: center; padding: 14px 12px; font-weight: 600; font-size: 13px; color: #c3ddf9; }
.tp-compare-head .tp-cmp-us { background: var(--tph-blue); font-weight: 800; color: #fff; }
.tp-cmp-row { border-top: 1px solid var(--tph-border-row); }
.tp-cmp-cell { text-align: center; padding: 14px 12px; font-weight: 500; font-size: 14px; color: var(--tph-muted); }
.tp-cmp-feature { text-align: left; padding: 14px 20px; font-weight: 600; color: var(--tph-ink); }
.tp-cmp-row .tp-cmp-us { font-weight: 700; color: var(--tph-green); background: var(--tph-green-tint); }

/* QR block */
.tp-section-qr { padding: 60px 36px; background: var(--tph-blue-deep); }
.tp-qr-block { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.tp-pill-dark { display: inline-block; padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #a9d3ff; }
.tp-qr-block .tp-h2 { margin: 16px 0 12px; }
.tp-qr-block-body { font-weight: 400; font-size: 16px; line-height: 1.65; color: #bcd8f5; text-wrap: pretty; }
.tp-qr-block-actions { display: flex; gap: 10px; margin-top: 20px; }
.tp-btn-light { padding: 12px 20px; border-radius: 9px; background: #fff; color: var(--tph-blue-deep); font-weight: 700; font-size: 14px; text-decoration: none; }
.tp-btn-ghost { padding: 12px 20px; border-radius: 9px; background: transparent; border: 1.5px solid rgba(255,255,255,.3); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.tp-qr-block-media { display: flex; justify-content: center; }
.tp-qr-demo { width: 190px; height: 190px; padding: 18px; background: #fff; border-radius: 16px; }

/* CTA */
.tp-section-cta { background: linear-gradient(180deg, #f2f8ff, #ffffff); }
.tp-cta-btn { display: inline-block; margin-top: 20px; text-decoration: none; padding: 15px 32px; height: auto; box-shadow: 0 8px 20px -8px rgba(47,158,68,.9); }

/* ============================ MOBILE (390px) ============================ */
@media (max-width: 767px) {
    .tp-hero { padding: 30px 18px 34px; }
    .tp-hero-inner { padding: 0; align-items: stretch; }
    .tp-eyebrow { margin-left: 0; }
    .tp-h1 { text-align: left; font-size: 32px; line-height: 1.08; letter-spacing: -.03em; }
    .tp-h1 br { display: none; }
    .tp-h1-accent { margin-left: .3em; }
    .tp-hero-sub { text-align: left; font-size: 15px; line-height: 1.55; margin: 12px 0 20px; }
    .tp-tool-card { padding: 0; box-shadow: none; }
    .tp-tool-row { padding: 16px 16px 12px; }
    .tp-url-field { padding: .75rem 1rem; }
    .tp-url-input { font-size: 14px; }
    .tp-create-btn, .tp-regen-btn.tp-keyword-save-btn { font-size: 22px; }
    .tp-suggestions, .tp-created, .tp-thinking, .tp-inline-msg { padding-left: 16px; padding-right: 16px; }
    .tp-chip-grid { grid-template-columns: 1fr; gap: 8px; }
    .tp-actions-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    /* TP-356: keyword row is a stacked flex column at all sizes now;
       keep "Add alias" a natural-width pill (left-aligned), not full width. */
    /* TP-360: result stacks on mobile; QR + thumbnail stay side by side. */
    .tp-result-grid { grid-template-columns: 1fr; gap: 22px; }
    .tp-result-aside { justify-content: flex-start; }
    .tp-created-link { font-size: 24px; }
    .tp-section { padding: 44px 18px; }
    .tp-steps-grid, .tp-qr-block { grid-template-columns: 1fr; gap: 22px; }
    .tp-table-examples .tp-table-head, .tp-table-examples .tp-tr { grid-template-columns: 1fr 1fr 1.1fr; }
    .tp-compare { overflow-x: auto; }
    .tp-compare-head, .tp-cmp-row { min-width: 560px; }
    .tp-h1, .tp-h2 { text-wrap: balance; }
}

/* ===== TP-15: native Gutenberg core-block reconciliation (page-side content) =====
   The page is built from core blocks (group/heading/paragraph/columns/table/
   buttons/shortcode) carrying the tp-* classes. Neutralise core/theme defaults so
   the design classes above drive the layout, and map the core wrappers to the
   design's grids, tables and buttons. */
.tp-home .wp-block-group { margin-block: 12px; }
.tp-home .wp-block-group.tp-hero,
.tp-home .wp-block-group.tp-section { max-width: none; }
.tp-home :where(.wp-block-heading) { margin: 0; }        /* .tp-h1/.tp-h2/.tp-step-h set their own */
.tp-home .tp-hero-inner > * { margin-top: 0; }           /* kill core block-gap; children carry spacing */

/* Steps + QR columns -> the design grids (two-class specificity beats core). */
.tp-home .tp-steps-grid.wp-block-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tp-home .tp-steps-grid .wp-block-column { flex-basis: auto; }
.tp-home .tp-qr-cols.wp-block-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin: 0; }
.tp-home .tp-qr-cols .wp-block-column { flex-basis: auto; }
.tp-home .tp-section-inner.tp-qr-block { display: block; }   /* grid now lives on .tp-qr-cols */

/* Core Button blocks -> design buttons. */
.tp-home .tp-cta-btn .wp-block-button__link { background: var(--tph-green); color: #fff; border: 0; border-radius: 11px; padding: 15px 32px; font-weight: 700; font-size: 16px; box-shadow: 0 8px 20px -8px rgba(47,158,68,.9); }
.tp-home .tp-btn-light .wp-block-button__link { background: #fff; color: var(--tph-blue-deep); border-radius: 9px; padding: 12px 20px; font-weight: 700; font-size: 14px; }
.tp-home .tp-btn-ghost .wp-block-button__link { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.3); border-radius: 9px; padding: 12px 20px; font-weight: 700; font-size: 14px; }

/* Core Table blocks -> the two design tables. */
.tp-home .tp-wp-table { margin: 0; }
.tp-home .tp-wp-table table { width: 100%; border-collapse: collapse; border: 1px solid var(--tph-border); border-radius: 14px; overflow: hidden; }
.tp-home .tp-wp-table th, .tp-home .tp-wp-table td { border: 1px solid var(--tph-border); }
.tp-home .tp-examples-table th { padding: 12px 20px; background: #eef3f9; font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--tph-muted); text-align: left; }
.tp-home .tp-examples-table td { padding: 15px 20px; background: #fff; font-size: 14px; color: var(--tph-muted); }
.tp-home .tp-examples-table td:first-child { font-family: var(--tph-mono); color: var(--tph-muted-3); text-decoration: line-through; }
.tp-home .tp-examples-table td:nth-child(2) { font-family: var(--tph-mono); font-weight: 700; color: var(--tph-blue-deep); }
.tp-home .tp-compare-table th { padding: 14px 12px; background: var(--tph-blue-deep); color: #c3ddf9; font-weight: 600; font-size: 13px; text-align: center; }
.tp-home .tp-compare-table th:nth-child(2) { background: var(--tph-blue); color: #fff; font-weight: 800; }
.tp-home .tp-compare-table td { padding: 14px 12px; text-align: center; font-size: 14px; color: var(--tph-muted); background: #fff; }
.tp-home .tp-compare-table td:first-child { text-align: left; padding: 14px 20px; font-weight: 600; color: var(--tph-ink); }
.tp-home .tp-compare-table td:nth-child(2) { background: var(--tph-green-tint); color: var(--tph-green); font-weight: 700; }

@media (max-width: 767px) {
    .tp-home .tp-steps-grid.wp-block-columns { grid-template-columns: 1fr; }
    .tp-home .tp-qr-cols.wp-block-columns { grid-template-columns: 1fr; }
    .tp-home .tp-wp-table { overflow-x: auto; }
}

/* TP-347: guest one-link limit — locked destination + limit dialog. */
#tp-destination.tp-locked,
#tp-destination-input-visual.tp-locked { cursor: pointer; }
.tp-guest-limit-dialog { max-width: 420px; }
.tp-guest-limit-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 2px; text-align: left; }
.tp-guest-limit-msg { margin: 0; font-size: 14px; line-height: 1.55; color: var(--tph-body, #46617f); }
.tp-guest-limit-cooldown { margin: 0; font-size: 13px; font-weight: 600; color: var(--tph-amber, #c9770a); }
.tp-guest-remove-btn:disabled,
.tp-guest-remove-btn.is-disabled { opacity: .5; cursor: not-allowed; }
.tp-guest-signin-btn { text-decoration: none; }

/* ===== TP-360 v2: redesigned "your link is live" result section ===== */
/* Status line: live status · expiry countdown only (single line now — the
   click/scan counts moved to the top of the right column, above the QR). */
.tp-result-statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.tp-result-statusline .tp-stat-expiry-pill { padding: 5px 11px; }
.tp-stat-expiry-pill .tp-expiry-cap { font-size: 12px; font-weight: 600; color: var(--tph-amber); }
/* Counts — a boxed cell at the top of the right column, above the QR. */
.tp-result-counts { display: inline-flex; align-items: baseline; color: var(--tph-body); font-size: 14px; font-weight: 500; white-space: nowrap; border: 1px solid var(--tph-border); border-radius: 10px; padding: 6px 12px; background: #fff; }
.tp-result-counts .tp-count-num { font-size: 18px; font-weight: 800; color: var(--tph-blue-deep); font-variant-numeric: tabular-nums; }
/* QR: one clean white square. qrcodejs draws the modules edge-to-edge with NO
   quiet zone, so the code itself is exactly 150x150 and the container's 12px white
   padding IS the (required, scannable) quiet zone. No cropping — cropping clips the
   corner finder patterns and breaks the code. Override the dashboard/frontend.css
   defaults (min-width:240, min-height:200, dashed inner border, flex stretching)
   that otherwise stretch the box and leave a big off-square gap. Single frame:
   the container is the only bordered box (card is transparent — no double box). */
.tp-home .tp-result-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.tp-home #tp-qr-section { display: inline-block; }
.tp-home .tp-qr-card { min-width: 0; display: inline-block; padding: 0; box-shadow: none; background: transparent; border: 0; border-radius: 0; }
.tp-home .tp-qr-code-container { min-height: 0; display: inline-block; width: auto; height: auto; overflow: visible; background: #fff; border: 1px solid #d8e4f0; border-radius: 10px; padding: 12px; line-height: 0; }
.tp-home .tp-qr-code-container canvas,
.tp-home .tp-qr-code-container img { width: 150px !important; height: 150px !important; display: block; margin: 0 !important; }

/* The link — centered, with an inline copy button. */
.tp-link-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
.tp-link-copy { flex: none; width: 30px; height: 30px; border: 1.5px solid var(--tph-border-field); border-radius: 8px; background: #fff; color: var(--tph-blue); cursor: pointer; font-size: 14px; }
.tp-link-copy:hover { border-color: var(--tph-blue); background: var(--tph-blue-tint); }

/* Primary CTA — Try it now. */
.tp-tryit-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 0; border-radius: 11px; background: var(--tph-green); color: #fff; cursor: pointer; text-align: left; margin-bottom: 16px; box-shadow: var(--tph-green-shadow); font-family: var(--tph-sans); }
.tp-tryit-btn:hover { background: var(--tph-green-hover); }
.tp-tryit-btn > i { font-size: 20px; }
.tp-tryit-text { display: flex; flex-direction: column; line-height: 1.25; }
.tp-tryit-text strong { font-weight: 700; font-size: 15px; }
.tp-tryit-text span { font-size: 12px; opacity: .92; }
.tp-tryit-arrow { margin-left: auto; font-size: 17px; }
/* Keep state ("Stop the clock"): blue button, green on hover. */
.tp-tryit-btn.tp-cta-keep { background: var(--tph-blue); box-shadow: var(--tph-chip-shadow); }
.tp-tryit-btn.tp-cta-keep:hover { background: var(--tph-green-hover); }

/* Action cards — same block style as the suggested keywords (.tp-chip). */
.tp-actions { animation: tpin .35s ease; margin-bottom: 14px; }
.tp-actions-label { font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--tph-muted); margin-bottom: 10px; }
.tp-actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tp-action-card { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 11px; cursor: pointer; border: 1.5px solid #dbe4ee; background: #fff; color: #3d5169; transition: all .14s; font-family: var(--tph-sans); }
.tp-action-card:hover { border-color: var(--tph-blue); }
.tp-action-ico { font-size: 18px; color: var(--tph-blue); margin-bottom: 6px; }
.tp-action-title { font-weight: 700; font-size: 13.5px; color: var(--tph-ink); }
.tp-action-hint { font-size: 11.5px; color: var(--tph-muted); }
.tp-action-card.is-disabled { opacity: .55; cursor: not-allowed; background: #f7f9fb; }
.tp-action-card.is-disabled:hover { border-color: #dbe4ee; }
.tp-action-card.is-disabled .tp-action-ico { color: var(--tph-muted); }
/* "Generate a new link" — full-width amber warning card (destructive + throttled). */
.tp-action-warn { flex-direction: row; align-items: center; gap: 12px; margin-top: 10px; border-color: var(--tph-border-amber); background: #fff9f0; }
.tp-action-warn .tp-action-body { display: flex; flex-direction: column; gap: 2px; }
.tp-action-warn:hover { border-color: var(--tph-amber); }
.tp-action-warn .tp-action-ico { color: var(--tph-amber); margin-bottom: 0; }
.tp-action-warn .tp-action-title { color: var(--tph-amber-text); }
.tp-action-warn .tp-action-hint { color: var(--tph-amber-text); opacity: .82; }
