/* tool-public-editorial.entry.css — lazy editorial bundle for /tools/{slug}.
   Token vars resolve via public-site.bundle.css which loads synchronously
   upstream of this file. Pure CSS only — no Tailwind directives. */
/* ==========================================================================
   tool-public-editorial.css

   Editorial layer for the public tool page (NewToolPublicPage.cshtml). All
   `.tp-*` selectors and the published-guide article live here. Split out
   from `tool-public.css` (chrome/runtime/workspace/rail) so the editorial
   styles can ship lazily — the workspace paints first, the long-form guide
   + sidebar + editorial cards stream in via media="print" → "all" swap.

   Pure CSS only (no Tailwind directives). Token references resolve via the
   public-site bundle's :root variables, which load synchronously upstream.

   See plan: kind-enchanting-storm.md Phase B1.
   ========================================================================== */
/* ── Guide hero ── */
.tp-guide {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-5);
}
.tp-guide__lead {
    margin: 0;
    max-width: 65ch;
    font-size: var(--tn-font-size-base);
    line-height: var(--tn-leading-body);
    color: var(--tn-text-muted);
}
/* ── Share control + static-intent popover ── */
.tn-share {
    position: relative;
    display: inline-flex;
}
.tn-share-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    padding: var(--tn-space-2);
    background: var(--tn-surface-card, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
    box-shadow: var(--tn-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.18));
}
.tn-share-popover__item {
    display: block;
    width: 100%;
    padding: var(--tn-space-2) var(--tn-space-3);
    border: 0;
    border-radius: var(--tn-radius-sm, 6px);
    background: transparent;
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    color: var(--tn-text-default);
    cursor: pointer;
}
.tn-share-popover__item:hover,
.tn-share-popover__item:focus-visible {
    background: var(--tn-surface-muted, #f1f1f1);
    outline: none;
}
.tn-share-popover__copy {
    margin-top: var(--tn-space-1);
    border-top: var(--tn-border-light, 1px solid #ddd);
    border-radius: 0;
}
.tn-embed {
    position: relative;
    display: inline-flex;
}
.tn-embed-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: min(360px, 90vw);
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-2);
    padding: var(--tn-space-3);
    background: var(--tn-surface-card, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
    box-shadow: var(--tn-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.18));
}
.tn-embed-popover[hidden] {
    display: none;
}
.tn-embed-popover__label {
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-xs, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tn-text-muted, #666);
}
.tn-embed-popover__code {
    width: 100%;
    padding: var(--tn-space-2);
    border: var(--tn-border-light, 1px solid #ddd);
    border-radius: var(--tn-radius-sm, 6px);
    background: var(--tn-surface-muted, #f6f6f6);
    font-family: var(--tn-font-mono, monospace);
    font-size: var(--tn-font-size-xs, 0.75rem);
    color: var(--tn-text-default);
    resize: vertical;
}
.tn-embed-popover__copy {
    width: 100%;
    padding: var(--tn-space-2) var(--tn-space-3);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-sm, 6px);
    background: var(--tn-accent-primary, #1a1a2e);
    color: var(--tn-on-accent, #fff);
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
}
.tn-embed-popover__copy:hover,
.tn-embed-popover__copy:focus-visible {
    filter: brightness(1.08);
    outline: none;
}
/* ── More (⋮) overflow menu — mirrors the share popover pattern ── */
.tn-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: var(--tn-z-popover, 500);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    padding: var(--tn-space-2);
    background: var(--tn-surface-card, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
    box-shadow: var(--tn-shadow-dropdown, 0 8px 24px rgba(0, 0, 0, 0.18));
}
.tn-more-menu__item {
    display: flex;
    align-items: center;
    gap: var(--tn-space-2);
    width: 100%;
    padding: var(--tn-space-2) var(--tn-space-3);
    border: 0;
    border-radius: var(--tn-radius-sm, 6px);
    background: transparent;
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    color: var(--tn-text-default);
    cursor: pointer;
}
.tn-more-menu__item:hover,
.tn-more-menu__item:focus-visible {
    background: var(--tn-surface-muted, #f1f1f1);
    outline: none;
}
.tn-more-menu__item .material-symbols-outlined {
    font-size: 1.15rem;
    color: var(--tn-text-secondary);
}
/* ── Lightweight modal dialog (embed snippet + QR) ── */
.tn-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--tn-z-modal-backdrop, 900);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--tn-space-4);
    background: rgb(var(--tn-color-ink-rgb) / 0.55);
}
.tn-dialog {
    position: relative;
    z-index: var(--tn-z-modal, 1000);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - var(--tn-space-8, 4rem));
    overflow-y: auto;
    padding: var(--tn-space-5);
    background: var(--tn-surface-card, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-lg, 12px);
    box-shadow: var(--tn-shadow-floating, 0 24px 70px rgba(0, 0, 0, 0.25));
}
.tn-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--tn-space-3);
    margin-bottom: var(--tn-space-4);
}
.tn-dialog__title {
    margin: 0;
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-lg, 1.125rem);
    font-weight: 800;
    color: var(--tn-text-default);
}
.tn-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 0;
    border-radius: var(--tn-radius-sm, 6px);
    background: transparent;
    color: var(--tn-text-secondary);
    cursor: pointer;
}
.tn-dialog__close:hover,
.tn-dialog__close:focus-visible {
    background: var(--tn-surface-muted, #f1f1f1);
    outline: none;
}
.tn-dialog__hint {
    margin: 0 0 var(--tn-space-3);
    font-size: var(--tn-font-size-sm, 0.875rem);
    color: var(--tn-text-secondary);
}
.tn-embed-snippet {
    width: 100%;
    min-height: 96px;
    padding: var(--tn-space-3);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
    background: var(--tn-surface-muted, #f6f6f6);
    font-family: var(--tn-font-mono, ui-monospace, monospace);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--tn-text-default);
    white-space: pre-wrap;
    word-break: break-all;
    resize: vertical;
}
.tn-dialog__actions {
    display: flex;
    gap: var(--tn-space-2);
    justify-content: flex-end;
    margin-top: var(--tn-space-4);
}
.tn-dialog__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--tn-space-2);
    padding: var(--tn-space-2) var(--tn-space-4);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
    background: var(--tn-accent-primary);
    color: var(--tn-color-paper, #fff);
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
    font-weight: 700;
    cursor: pointer;
}
.tn-dialog__btn--ghost {
    background: transparent;
    color: var(--tn-text-default);
}
.tn-collection-picker {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-2);
}
.tn-collection-picker__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tn-space-3);
    width: 100%;
    padding: var(--tn-space-2) var(--tn-space-3);
    border: 1px solid var(--tn-border-subtle);
    border-radius: var(--tn-radius-md, 8px);
    background: var(--tn-surface-inset);
    color: var(--tn-text-default);
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.tn-collection-picker__item:hover,
.tn-collection-picker__item:focus-visible {
    border-color: var(--tn-accent-primary);
    background: var(--tn-surface-panel);
}
.tn-collection-picker__count {
    font-size: var(--tn-font-size-xs, 0.75rem);
    font-weight: 500;
    color: var(--tn-text-muted);
}
.tn-collection-picker__input {
    flex: 1;
    min-width: 0;
    padding: var(--tn-space-2) var(--tn-space-3);
    border: 1px solid var(--tn-border-subtle);
    border-radius: var(--tn-radius-md, 8px);
    background: var(--tn-surface-panel);
    color: var(--tn-text-default);
    font-family: var(--tn-font-body);
    font-size: var(--tn-font-size-sm, 0.875rem);
}
.tn-dialog__btn:hover {
    box-shadow: var(--tn-shadow-sm);
}
.tn-qr-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--tn-space-3);
    margin: 0;
}
.tn-qr-figure img,
.tn-qr-figure canvas {
    width: 220px;
    height: 220px;
    padding: var(--tn-space-3);
    background: var(--tn-color-paper, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-md, 8px);
}
.tn-qr-figure figcaption {
    max-width: 100%;
    font-size: var(--tn-font-size-sm, 0.8rem);
    color: var(--tn-text-secondary);
    text-align: center;
    word-break: break-all;
}
/* ── Filled-heart accent once a tool is favorited ── */
.tn-favorite__btn[aria-pressed="true"] .material-symbols-outlined {
    color: var(--tn-color-pink);
    font-variation-settings: "FILL" 1;
}
/* NOTE: the embed-only ".tn-embed-badge" / ".tool-embed-body" styles live
   inline in Views/Shared/_ToolEmbedLayout.cshtml — that layout does not load
   this bundle, and the badge never renders on the normal tool page. */
/* ── Published long-form guide (.tool-seo / ToolPageMarkdown) ── */
.tp-seo-article {
    position: relative;
    z-index: 1;
    padding: var(--tn-space-6);
    background: var(--tn-surface-card, #fff);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-lg, 12px);
    box-shadow: var(--tn-shadow-sm);
}
.tp-seo-article__title {
    margin: 0 0 var(--tn-space-4);
    font-family: var(--tn-font-headline);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: var(--tn-tracking-heading);
    line-height: var(--tn-leading-tight);
    color: var(--tn-text-default);
}
.tp-seo-article__body {
    max-width: 72ch;
    font-size: var(--tn-font-size-base);
    line-height: var(--tn-leading-body);
    color: var(--tn-text-default);
}
.tp-seo-article__body h2,
.tp-seo-article__body h3,
.tp-seo-article__body h4 {
    margin: var(--tn-space-5) 0 var(--tn-space-3);
    font-family: var(--tn-font-headline);
    font-weight: 800;
    letter-spacing: var(--tn-tracking-heading);
    color: var(--tn-text-default);
}
.tp-seo-article__body p,
.tp-seo-article__body ul,
.tp-seo-article__body ol,
.tp-seo-article__body blockquote,
.tp-seo-article__body table {
    margin: 0 0 var(--tn-space-4);
}
.tp-seo-article__body ul,
.tp-seo-article__body ol {
    padding-left: 1.4em;
}
.tp-seo-article__body li {
    margin-bottom: var(--tn-space-2);
}
.tp-seo-article__body a {
    color: var(--tn-color-link, #1d4ed8);
    text-decoration: underline;
}
.tp-seo-article__body code {
    padding: 0.1em 0.35em;
    background: var(--tn-surface-muted, #f1f1f1);
    border-radius: 4px;
    font-family: var(--tn-font-mono, monospace);
    font-size: 0.9em;
}
.tp-seo-article__body pre {
    margin: 0 0 var(--tn-space-4);
    padding: var(--tn-space-4);
    overflow-x: auto;
    background: var(--tn-surface-muted, #f1f1f1);
    border: var(--tn-border-light, 1px solid #ddd);
    border-radius: var(--tn-radius-md, 8px);
}
.tp-seo-article__body pre code {
    padding: 0;
    background: none;
}
.tp-seo-article__body table {
    width: 100%;
    border-collapse: collapse;
}
.tp-seo-article__body th,
.tp-seo-article__body td {
    padding: var(--tn-space-2) var(--tn-space-3);
    border: var(--tn-border-light, 1px solid #ddd);
    text-align: left;
}
/* ── HowTo (visible mirror of JSON-LD HowTo) ── */
.tp-howto__steps {
    list-style: none;
    padding: 0;
    margin: var(--tn-space-4) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-4);
    counter-reset: tp-howto;
}
.tp-howto__step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--tn-space-4);
    align-items: start;
    padding: var(--tn-space-4);
    background: var(--tn-surface-card);
    border: 1px solid var(--tn-border-muted);
    border-radius: var(--tn-radius-lg);
}
.tp-howto__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--tn-color-accent-soft, var(--tn-accent-primary));
    color: var(--tn-text-on-accent, var(--tn-text-default));
    font-family: var(--tn-font-headline);
    font-weight: 700;
    font-size: var(--tn-font-size-sm);
}
.tp-howto__step-title {
    margin: 0;
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-md);
    font-weight: 700;
    color: var(--tn-text-default);
}
.tp-howto__step-copy {
    margin: var(--tn-space-1) 0 0;
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    line-height: var(--tn-leading-body);
}
/* ── Questions (visible mirror of JSON-LD FAQPage) ── */
.tp-questions__list {
    margin-top: var(--tn-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-3);
}
.tp-questions__item {
    border: 1px solid var(--tn-border-muted);
    border-radius: var(--tn-radius-lg);
    background: var(--tn-surface-card);
    padding: var(--tn-space-3) var(--tn-space-4);
}
.tp-questions__q {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--tn-space-3);
    font-family: var(--tn-font-headline);
    font-weight: 700;
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-default);
}
.tp-questions__q::-webkit-details-marker {
    display: none;
}
.tp-questions__chevron {
    font-size: 18px;
    transition: transform var(--tn-transition);
}
.tp-questions__item[open] .tp-questions__chevron {
    transform: rotate(180deg);
}
.tp-questions__a {
    margin-top: var(--tn-space-2);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    line-height: var(--tn-leading-body);
}
/* ── Content split layout (main + sidebar) ── */
.tp-content-split {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: var(--tn-space-10);
    align-items: start;
    position: relative;
    z-index: 1;
}
/* When the main FAQ already carries the tool's questions, the sidebar Guided
   Learning Path is dropped to avoid duplication — collapse to a single column. */
.tp-content-split--no-aside {
    grid-template-columns: minmax(0, 1fr);
}
.tp-content-main {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-10);
}
/* ── Section headers with sticker ── */
.tp-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-2);
    margin-bottom: var(--tn-space-4);
}
.tp-section-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 10px;
    background: var(--tn-color-yellow);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-pill);
    box-shadow: var(--tn-shadow-sm);
    font-family: var(--tn-font-headline);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tn-color-ink);
    transform: rotate(-1deg);
}
.tp-section-title {
    margin: 0;
    font-family: var(--tn-font-headline);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 850;
    letter-spacing: var(--tn-tracking-heading);
    color: var(--tn-text-default);
}
/* ── Discovery list (Continue your workflow / Related Reading) ──
   Clean list rows replace the old heavy tp-tool-card grid. Hairline divider
   between rows (first row has none, mirroring the .tp-faq idiom), a single
   accent on the leading glyph, and a quiet hover that lifts the row background
   and reveals the chevron. No heavy border, no hard offset shadow. */
.tp-discover-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tn-border-muted);
    border-radius: var(--tn-radius-lg);
    background: var(--tn-surface-panel);
    overflow: hidden;
}
.tp-discover-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--tn-space-4);
    padding: var(--tn-space-4) var(--tn-space-5);
    border-top: 1px solid var(--tn-border-muted);
    color: var(--tn-text-default);
    text-decoration: none;
    transition: background var(--tn-transition);
}
.tp-discover-row:first-child {
    border-top: 0;
}
.tp-discover-row:hover,
.tp-discover-row:focus-visible {
    background: var(--tn-surface-panel-muted);
}
.tp-discover-row__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--tn-radius-md);
    background: var(--tn-surface-canvas);
    color: var(--tn-accent-primary);
}
.tp-discover-row__icon .material-symbols-outlined {
    font-size: 18px;
}
.tp-discover-row__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tp-discover-row__title {
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-sm);
    font-weight: 700;
    color: var(--tn-text-default);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-discover-row__sub {
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-discover-row__chevron {
    display: inline-flex;
    align-items: center;
    color: var(--tn-text-soft);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--tn-transition), transform var(--tn-transition);
}
.tp-discover-row__chevron .material-symbols-outlined {
    font-size: 20px;
}
.tp-discover-row:hover .tp-discover-row__chevron,
.tp-discover-row:focus-visible .tp-discover-row__chevron {
    opacity: 1;
    transform: translateX(0);
    color: var(--tn-accent-primary);
}
.tp-empty-card {
    grid-column: 1 / -1;
    display: grid;
    gap: var(--tn-space-2);
    padding: var(--tn-space-6);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-xl);
    background: var(--tn-surface-panel-muted);
    box-shadow: var(--tn-shadow-sm);
    color: var(--tn-text-default);
    text-decoration: none;
}
.tp-empty-card .material-symbols-outlined {
    color: var(--tn-accent-primary);
}
.tp-empty-card strong {
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-base);
    color: var(--tn-text-default);
}
.tp-empty-card span:last-child {
    color: var(--tn-text-muted);
    font-size: var(--tn-font-size-sm);
    line-height: var(--tn-leading-body);
}
/* ── Related Reading blog cards ──
   Image-top cards mirroring the homepage "From the blog" card shape, but in the
   tool page's lighter language: hairline border + soft shadow instead of the
   heavy 3px Memphis frame, and a single accent. */
.tp-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--tn-space-5);
}
.tp-blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tn-border-muted);
    border-radius: var(--tn-radius-lg);
    background: var(--tn-surface-panel);
    box-shadow: var(--tn-shadow-sm);
    text-decoration: none;
    color: var(--tn-text-default);
    overflow: hidden;
    transition: transform var(--tn-transition), box-shadow var(--tn-transition), border-color var(--tn-transition);
}
.tp-blog-card:hover,
.tp-blog-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--tn-border-default);
    box-shadow: var(--tn-shadow-md);
}
.tp-blog-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--tn-surface-panel-muted);
    border-bottom: 1px solid var(--tn-border-muted);
    overflow: hidden;
}
.tp-blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tp-blog-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-2);
    padding: var(--tn-space-4) var(--tn-space-5);
}
.tp-blog-card__eyebrow {
    font-size: var(--tn-font-size-xs);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tn-text-muted);
}
.tp-blog-card__title {
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-base);
    font-weight: 800;
    line-height: 1.3;
    color: var(--tn-text-default);
}
.tp-blog-card__excerpt {
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    line-height: var(--tn-leading-body);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tp-blog-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tn-space-2);
    margin-top: auto;
    padding-top: var(--tn-space-2);
}
.tp-blog-card__date {
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-soft);
}
.tp-blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--tn-space-1);
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-sm);
    font-weight: 800;
    color: var(--tn-accent-primary);
}
.tp-blog-card__cta .material-symbols-outlined {
    font-size: 16px;
    transition: transform var(--tn-transition);
}
.tp-blog-card:hover .tp-blog-card__cta .material-symbols-outlined,
.tp-blog-card:focus-visible .tp-blog-card__cta .material-symbols-outlined {
    transform: translateX(3px);
}
/* ── Sidebar ── */
.tp-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-6);
}
/* Learning path panel */
.tp-learning {
    padding: var(--tn-space-6);
    border: var(--tn-border-heavy);
    border-radius: var(--tn-radius-xl);
    background: var(--tn-surface-panel);
    box-shadow: var(--tn-shadow-card);
    border-top: 4px solid var(--tn-color-pink);
}
.tp-learning__title {
    margin: 0 0 var(--tn-space-5);
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tn-text-default);
}
.tp-learning__list {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-4);
}
.tp-faq {
    padding-top: var(--tn-space-4);
    border-top: 1px solid var(--tn-border-muted);
}
.tp-faq:first-child {
    padding-top: 0;
    border-top: 0;
}
.tp-faq summary {
    font-family: var(--tn-font-headline);
    font-size: var(--tn-font-size-xs);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--tn-text-default);
    transition: color var(--tn-transition);
}
.tp-faq summary:hover,
.tp-faq[open] summary {
    color: var(--tn-accent-primary);
}
.tp-faq summary .material-symbols-outlined {
    font-size: 16px;
    transition: transform var(--tn-transition);
}
.tp-faq[open] summary .material-symbols-outlined {
    transform: rotate(180deg);
}
.tp-faq__answer {
    margin: var(--tn-space-2) 0 0;
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-muted);
    line-height: var(--tn-leading-body);
}
/* ── Responsive ── */
@media (max-width: 1024px) {
    .tool-page-header__inner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .tool-page-header__decor {
        display: none;
    }

    .tool-page-header__actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .tp-content-split {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .tool-page-header__inner {
        padding-inline: var(--tn-space-4);
    }

    .tool-page-status-badge {
        display: none;
    }

    .tool-page-header__actions {
        align-items: stretch;
    }

    .tool-page-focus-btn {
        order: 1;
        margin-left: auto;
    }
}
/* Legacy bridge — keep old class selectors working until markup is updated */
#content-guide {
    background: var(--tn-surface-canvas);
    color: var(--tn-text-default);
}
#content-guide a {
    color: var(--tn-text-default);
    text-decoration: none;
}
#content-guide a:hover {
    color: var(--tn-accent-primary);
}
.toast {
    position: fixed;
    right: var(--tn-space-6);
    bottom: var(--tn-space-6);
    z-index: 9999;
    transform: translateY(var(--tn-space-12));
    opacity: 0;
    pointer-events: none;
    transition:
        transform var(--tn-transition),
        opacity var(--tn-transition);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
*:focus-visible {
    outline: var(--tn-space-1) solid var(--tn-accent-primary);
    outline-offset: var(--tn-space-1);
}
@media (max-width: 768px) {
    body[data-tool-public-layout="design-shell"] .breadcrumb-shell__action-link,
    body[data-tool-public-layout="design-shell"] .breadcrumb-shell__divider {
        display: none;
    }

    body[data-tool-public-layout="design-shell"] .breadcrumb-shell__actions {
        min-width: 0;
        overflow: hidden;
    }

    .tool-workbench-row {
        display: block;
    }

    .tool-workbench-main {
        padding-right: 0;
    }

    .tool-runtime-stage {
        min-height: 42rem;
    }

    .tool-workbench-rail {
        position: static;
        width: 100%;
        min-height: auto;
        border-top: var(--memphis-border-thin);
        border-left: 0;
    }

    .rail-overlay,
    .rail-overlay:hover,
    .rail-overlay:focus-within {
        width: 100%;
        box-shadow: none;
    }

    .rail-content {
        visibility: visible;
        opacity: 1;
    }

    .tool-workbench-rail-icons {
        flex-direction: row;
        width: 100%;
        border-right: 0;
        border-bottom: var(--memphis-border-thin);
    }

    #tool-header-ad {
        display: none;
    }
}
/* ══════════════════════════════════════════════════════════════
   MOBILE BOTTOM-SHEET RAIL (<720px)
   On narrow viewports the right-rail overlay is repositioned as a
   bottom sheet anchored to the viewport floor. The icon strip acts
   as a tap handle, and `:focus-within` (any keyboard / tap focus on
   a child control) reveals the rail content sliding upward.
   This replaces the side-slide overlay pattern, which obscured the
   workspace on small screens.
   Pairs with `viewport-fit=cover` in `_SharedShellLayoutBase.cshtml`
   for safe-area-inset support on iOS Safari.
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Reserve room at the bottom of the workspace for the collapsed
       bottom sheet handle so the runtime stage isn't obscured. */
    .tool-workbench-row {
        padding-bottom: calc(48px + env(safe-area-inset-bottom));
    }

    .rail-overlay {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        min-height: 0;
        max-height: 80dvh;
        z-index: 50;
        background: var(--tn-surface-panel);
        border-top: var(--tn-border-heavy);
        border-left: 0;
        border-radius: var(--tn-radius-xl) var(--tn-radius-xl) 0 0;
        box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.18);
        padding-bottom: env(safe-area-inset-bottom);
        transition: max-height var(--tn-transition);
        overflow: hidden;
    }

    /* Grab-handle pip at the top of the sheet (decorative, signals
       "drag/tap me to expand"). */
    .rail-overlay::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--tn-border-default);
        pointer-events: none;
        z-index: 1;
    }

    /* Collapsed state: only the icon strip handle is visible. */
    .rail-overlay,
    .rail-overlay:hover {
        box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.18);
    }

    /* Expanded state: when any rail control is focused (keyboard or
       tap) the sheet grows upward to reveal its content. */
    .rail-overlay:focus-within {
        max-height: 80dvh;
        box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.24);
    }

    .rail-content {
        max-height: 0;
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
        transition: max-height var(--tn-transition), opacity var(--tn-transition);
        -webkit-overflow-scrolling: touch;
    }

    .rail-overlay:focus-within .rail-content {
        max-height: calc(80dvh - 56px);
        visibility: visible;
        opacity: 1;
    }

    .tool-workbench-rail {
        position: static;
        width: 100%;
        min-height: 0;
        border-top: 0;
        border-left: 0;
        border-radius: var(--tn-radius-xl) var(--tn-radius-xl) 0 0;
    }

    /* Icon strip becomes the always-visible bottom-sheet handle. */
    .tool-workbench-rail-icons {
        position: relative;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        min-height: 48px;
        padding-top: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--tn-border-muted);
    }
}
/* ── Contextual affiliate cards (admin-managed, CLS-safe) ── */
.tp-affiliates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 0 0 24px;
}
.tp-affiliate-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid var(--tn-border-muted);
    border-radius: 10px;
    background: var(--tn-surface-panel);
    color: var(--tn-text-default);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.tp-affiliate-card:hover,
.tp-affiliate-card:focus-visible {
    border-color: var(--tn-accent-primary);
    transform: translateY(-1px);
}
.tp-affiliate-card__icon {
    flex-shrink: 0;
    font-size: 24px;
    color: var(--tn-accent-primary);
}
.tp-affiliate-card__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tp-affiliate-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tn-text-soft);
}
.tp-affiliate-card__headline {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ──────────────────────────────────────────────────────────────────────────
   Mini-app meta strip — real signals only (category · free · maintained-by ·
   usage proof · rating). No invented dates. Rendered below the description in
   NewToolPublicPage.cshtml.
   ────────────────────────────────────────────────────────────────────────── */
.tool-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tn-space-2) var(--tn-space-4);
    margin-top: var(--tn-space-3);
}
.tool-meta-strip__item {
    display: inline-flex;
    align-items: center;
    gap: var(--tn-space-1);
    color: var(--tn-text-muted);
    font-size: var(--tn-font-size-xs);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.tool-meta-strip__item .material-symbols-outlined {
    font-size: 16px;
    color: var(--tn-text-soft);
}
.tool-meta-strip__chip {
    padding: var(--tn-space-1) var(--tn-space-3);
    border: 1px solid var(--tn-border-default);
    border-radius: var(--tn-radius-pill);
    background: var(--tn-surface-panel);
    color: var(--tn-text-secondary);
    text-decoration: none;
    transition:
      border-color var(--tn-transition),
      color var(--tn-transition),
      background var(--tn-transition);
}
.tool-meta-strip__chip:hover {
    border-color: var(--tn-accent-primary);
    color: var(--tn-accent-primary-strong);
    background: var(--tn-accent-primary-soft);
}
.tool-meta-strip__chip .material-symbols-outlined {
    color: inherit;
}
.tool-meta-strip__rating {
    font-weight: 700;
    color: var(--tn-text-secondary);
}
.tool-meta-strip__star {
    color: var(--tn-warning);
}
.tool-meta-strip__rating-sep {
    color: var(--tn-text-muted);
    font-weight: 600;
}
/* Secondary provenance line — Added / Updated / Built-by / Maintained-by.
   Demoted out of the main strip (Full-trim milestone) so the strip carries
   only the high-signal items. Muted, smaller, middot-separated. */
.tool-meta-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tn-space-1) var(--tn-space-3);
    margin: var(--tn-space-2) 0 0;
    color: var(--tn-text-muted);
    font-size: var(--tn-font-size-2xs, 0.6875rem);
    line-height: 1.3;
}
.tool-meta-details__item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.tool-meta-details__item + .tool-meta-details__item::before {
    content: "·";
    margin-inline-end: var(--tn-space-3);
    color: var(--tn-text-muted);
}
/* Published 1-line comments under the strip (signed-in, moderated). */
.tool-meta-reviews {
    display: flex;
    flex-direction: column;
    gap: var(--tn-space-2);
    margin: var(--tn-space-3) 0 0;
    padding: 0;
    list-style: none;
}
.tool-meta-reviews__item {
    display: flex;
    align-items: center;
    gap: var(--tn-space-2);
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-secondary);
}
.tool-meta-reviews__stars {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 1;
}
.tool-meta-reviews__stars .material-symbols-outlined {
    font-size: 14px;
    color: var(--tn-warning);
}
.tool-meta-reviews__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ──────────────────────────────────────────────────────────────────────────
   Rate-this-tool widget — trigger button in the header actions row opens a
   small popover anchored beneath it (.tool-page-rate is position:relative).
   ────────────────────────────────────────────────────────────────────────── */
.tn-rate__btn[aria-expanded="true"] {
    border-color: var(--tn-accent-primary);
    color: var(--tn-accent-primary-strong);
}
.tool-page-rate__panel {
    position: absolute;
    top: calc(100% + var(--tn-space-2));
    right: 0;
    z-index: 40;
    width: 260px;
    padding: var(--tn-space-4);
    border: 1px solid var(--tn-border-default);
    border-radius: var(--tn-radius-lg);
    background: var(--tn-surface-panel);
    box-shadow: var(--tn-shadow-floating);
}
.tool-page-rate__heading {
    margin: 0 0 var(--tn-space-3);
    font-size: var(--tn-font-size-sm);
    font-weight: 700;
    color: var(--tn-text-default);
}
.tool-page-rate__stars {
    display: flex;
    align-items: center;
    gap: var(--tn-space-1);
}
.tool-page-rate__star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--tn-radius-md);
    background: transparent;
    color: var(--tn-text-soft);
    cursor: pointer;
    transition:
      color var(--tn-transition),
      background var(--tn-transition),
      transform var(--tn-transition);
}
.tool-page-rate__star .material-symbols-outlined {
    font-size: 26px;
}
.tool-page-rate__star:hover {
    color: var(--tn-warning);
    transform: scale(1.1);
}
.tool-page-rate__star.is-selected {
    color: var(--tn-warning);
}
.tool-page-rate__star:focus-visible {
    outline: 2px solid var(--tn-accent-primary);
    outline-offset: 2px;
}
.tool-page-rate__comment {
    margin-top: var(--tn-space-3);
}
.tool-page-rate__comment-label {
    display: block;
    margin-bottom: var(--tn-space-1);
    font-size: var(--tn-font-size-micro);
    font-weight: 600;
    color: var(--tn-text-muted);
}
.tool-page-rate__comment-input {
    width: 100%;
    min-height: 36px;
    padding: var(--tn-space-1) var(--tn-space-3);
    border: 1px solid var(--tn-border-default);
    border-radius: var(--tn-radius-md);
    background: var(--tn-surface-canvas);
    color: var(--tn-text-default);
    font-size: var(--tn-font-size-xs);
}
.tool-page-rate__comment-input:focus-visible {
    outline: 2px solid var(--tn-accent-primary);
    outline-offset: 1px;
    border-color: var(--tn-accent-primary);
}
.tool-page-rate__hint {
    margin: var(--tn-space-3) 0 0;
    font-size: var(--tn-font-size-micro);
    color: var(--tn-text-muted);
}
.tool-page-rate__hint a {
    color: var(--tn-accent-primary-strong);
    font-weight: 600;
    text-decoration: underline;
}
/* ──────────────────────────────────────────────────────────────────────────
   Right-rail collapse — the always-visible icon strip carries a toggle
   (#rail-collapse-btn). When [data-tn-rail] gains .is-collapsed (persisted via
   AppState.railCollapsed), the rail shrinks to just the toggle: tool-tab icons
   hide and the hover-to-expand width is pinned to the icon-strip width so the
   content panel cannot peek open.
   ────────────────────────────────────────────────────────────────────────── */
#rail-collapse-btn {
    color: var(--tn-text-muted);
}
#rail-collapse-btn:hover {
    color: var(--tn-text-default);
    background: var(--tn-surface-subtle);
}
#rail-collapse-btn:focus-visible {
    outline: 2px solid var(--tn-accent-primary);
    outline-offset: 2px;
}
/* Collapse is a desktop affordance only. Below 768px the rail is a full-width
   static bottom-sheet (see the max-width:768px block), so the icon-width pin
   must not apply there even if AppState.railCollapsed persisted from desktop. */
@media (min-width: 769px) {
    .tool-workbench-rail.is-collapsed [id^="rail-icon-"] {
        display: none;
    }

    .rail-overlay.is-collapsed,
    .rail-overlay.is-collapsed:hover,
    .rail-overlay.is-collapsed:focus-within {
        width: var(--tn-space-12);
        box-shadow: none;
    }

    .rail-overlay.is-collapsed .rail-content {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}
/* Back-to-top affordance at the end of the long editorial content. Anchor
   jump to #main-content — works with no JS. */
.tp-back-to-top-row {
    display: flex;
    justify-content: center;
    margin-top: var(--tn-space-8);
}
.tp-back-to-top {
    display: inline-flex;
    align-items: center;
    gap: var(--tn-space-1);
    padding: var(--tn-space-2) var(--tn-space-4);
    border: 1px solid var(--tn-border-default);
    border-radius: var(--tn-radius-md);
    background: var(--tn-surface-panel);
    color: var(--tn-text-default);
    font-size: var(--tn-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--tn-transition), color var(--tn-transition);
}
.tp-back-to-top:hover {
    border-color: var(--tn-accent-primary);
    color: var(--tn-accent-primary-strong);
}
.tp-back-to-top .material-symbols-outlined {
    font-size: 18px;
}
/* Print: strip the interactive workspace + chrome, keep the editorial guide,
   FAQ, and hero identity so a printed page reads as documentation. */
@media print {
    .tool-workbench-row,
    .tool-page-header__actions,
    .tool-page-family-strip,
    #focus-mode-badge,
    .tp-back-to-top-row,
    .feedback-fab,
    .sticky-footer-ad {
        display: none !important;
    }

    .tp-content,
    .tp-seo-article,
    .tp-questions,
    .tp-howto {
        break-inside: avoid;
    }

    .tool-page-header,
    .tp-content {
        background: #fff !important;
        box-shadow: none !important;
    }
}
