/* Share thesis dialog (design 1a, "one link, edited in place") — one link per
   thesis; every setting edits that link. The sheet deliberately breaks two
   compact-sheet conventions (in-body title, filled Create / Copy pills); that is
   the approved design, not a mistake to "fix" back. Colors are tokens only. */

/* Strip MudDialog's own padding/paper defaults so .ij-share-sheet owns the
   exact 22/24/18 padding from the design. */
.ij-share-dialog.mud-dialog {
    width: min(496px, calc(100vw - 32px));
    max-width: 496px;
    border-radius: 16px;
}

.ij-share-dialog .mud-dialog-content {
    padding: 0;
}

.ij-share-sheet {
    display: flex;
    flex-direction: column;
    padding: 22px 24px 18px;
}

/* --- Header: title + "{Company} · {TICKER}" + close --- */

.ij-share-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ij-share-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.ij-share-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ij-text-secondary);
}

.ij-share-close {
    flex: none;
    display: inline-flex;
    border: none;
    background: transparent;
    padding: 2px;
    color: var(--ij-text-secondary);
    cursor: pointer;
}

/* --- Link field: URL + Copy link --- */

.ij-share-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 8px 8px 8px 14px;
    border-radius: 12px;
    background: var(--ij-bg-gray);
}

.ij-share-url {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ij-share-copy-btn {
    flex: none;
    border: none;
    border-radius: 980px;
    padding: 7px 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--ij-primary);
    cursor: pointer;
    transition: background-color var(--ij-duration-base) var(--ij-ease-standard);
}

/* State classes applied by the delegated copy handler in app-utils.js. */
.ij-share-copy-btn.ij-copy-ok {
    background: var(--ij-gain);
}

.ij-share-copy-btn.ij-copy-fail {
    background: var(--ij-loss);
}

.ij-share-field-caption {
    margin-top: 7px;
    font-size: 12px;
    color: var(--ij-text-secondary);
}

/* --- What readers see --- */

.ij-share-links-header {
    margin: 20px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ij-text-secondary);
}

.ij-share-rows {
    display: flex;
    flex-direction: column;
}

.ij-share-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-top: 1px solid var(--ij-divider);
}

label.ij-share-row {
    cursor: pointer;
}

.ij-share-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ij-share-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--mud-palette-text-primary);
}

.ij-share-row-sub {
    font-size: 12px;
    color: var(--ij-text-secondary);
    text-wrap: pretty;
}

.ij-share-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ij-text-secondary);
}

.ij-share-tag-live {
    color: var(--ij-gain);
}

.ij-share-refresh-btn {
    flex: none;
    border: none;
    border-radius: 980px;
    padding: 6px 13px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ij-primary);
    background: var(--ij-primary-tint);
    cursor: pointer;
    transition: opacity var(--ij-duration-base) var(--ij-ease-standard);
}

.ij-share-refresh-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

/* iOS-geometry switch (42×25 track, 20px white thumb) in both states. MudBlazor's
   checked thumb takes the primary colour and a hover halo on .mud-switch-base, which
   is what made the checked switch read larger than the unchecked one. */
.ij-share-switch {
    flex: none;
    margin: 0;
}

.ij-share-switch .mud-switch-span {
    width: 42px;
    height: 25px;
    padding: 0;
    overflow: visible;
}

.ij-share-switch .mud-switch-track {
    width: 42px;
    height: 25px;
    border-radius: 13px;
    opacity: 1;
    background-color: var(--ij-divider);
    transition: background-color var(--ij-duration-base) var(--ij-ease-standard);
}

.ij-share-switch .mud-switch-base {
    padding: 2.5px;
    color: #fff;
    transition: transform var(--ij-duration-base) var(--ij-ease-standard);
}

.ij-share-switch .mud-switch-base:hover,
.ij-share-switch .mud-switch-base:focus-visible {
    background-color: transparent;
}

.ij-share-switch .mud-switch-base.mud-checked {
    transform: translateX(17px);
    color: #fff;
}

.ij-share-switch .mud-switch-base.mud-checked + .mud-switch-track {
    background-color: var(--ij-primary);
    opacity: 1;
}

.ij-share-switch .mud-switch-thumb-medium {
    width: 20px;
    height: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ij-share-switch.mud-disabled .mud-switch-base + .mud-switch-track {
    opacity: 0.5 !important;
}

/* "{n} older links still work · Stop all" */
.ij-share-older {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 11px 0 0;
    border-top: 1px solid var(--ij-divider);
    font-size: 12px;
    color: var(--ij-text-secondary);
}

.ij-share-older .ij-share-stop-btn {
    font-size: 12px;
}

/* --- Footer: Open as reader / Stop sharing, or the inline confirm --- */

.ij-share-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--ij-divider);
}

.ij-share-older + .ij-share-footer,
.ij-share-older + .ij-dcf-field-error + .ij-share-footer {
    margin-top: 11px;
}

.ij-share-open {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ij-primary);
    text-decoration: none;
}

.ij-share-open:hover {
    text-decoration: underline;
}

.ij-share-stop-btn {
    border: none;
    background: none;
    padding: 6px 0;
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ij-loss);
    cursor: pointer;
}

.ij-share-confirm-text {
    flex: 1;
    min-width: 200px;
    font-size: 12.5px;
    color: var(--ij-text-secondary);
}

.ij-share-keep-btn {
    border: none;
    background: none;
    padding: 6px 8px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
}

.ij-share-stop-confirm-btn {
    border: none;
    border-radius: 980px;
    padding: 7px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--ij-loss);
    cursor: pointer;
}

/* --- Empty state --- */

.ij-share-intro {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ij-text-secondary);
}

.ij-share-create-row {
    margin-top: 16px;
}

.ij-share-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    border-radius: 980px;
    padding: 9px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--ij-primary);
    cursor: pointer;
    transition: opacity var(--ij-duration-base) var(--ij-ease-standard);
}

.ij-share-create-btn:hover {
    opacity: 0.88;
}

.ij-share-sheet .ij-dcf-field-error {
    margin-top: 10px;
}

/* ════════════════════════════════════════════════════════════════
   Public page (design 1A) — /t/{token}, standalone publication page.
   Renders inside the bare PublicShareLayout: no app chrome, so this
   page draws its own top bar. Colors are tokens only, per the design
   reference's header comment. Class prefix ij-st-.
   ════════════════════════════════════════════════════════════════ */

/* Root wrapper. PublicShareLayout renders @Body only — no app-shell markup —
   so this is the one place the page's font stack, base text color, and page
   background get set; everything below inherits them. Without this the page
   fell back to the browser's serif default (MainLayout normally carries the
   app's typography baseline, which this bare layout never applies). */
.ij-st-page {
    font-family: var(--ij-font-family);
    -webkit-font-smoothing: antialiased;
    background: var(--ij-bg);
    color: var(--ij-text-primary);
    min-height: 100vh;

    /* Component-scoped indigo for the "key assumptions" label — distinct from
       --ij-primary (blue), which the catalysts label uses. No shared indigo
       token exists yet (checked tokens.css), so it's defined here with both
       theme values, mirroring tokens.css's own light/dark block pattern —
       declaring it light-only would freeze the light value into dark (see
       the CSS-var-alias-theme-scope lesson). */
    --ij-st-indigo: #594ae2;
}

.ij-theme-dark .ij-st-page {
    --ij-st-indigo: #7e6fff;
}

/* Page-scoped verdict-chip color overrides: the bare PublicShareLayout never
   mounts MudThemeProvider, so --mud-palette-success/error/text-secondary
   (which thesis.css's base .ij-thesis-verdict-chip--* rely on) are undefined
   here and the chip renders as plain text on a transparent background.
   Override only color/background — padding/radius/font stay in thesis.css's
   base .ij-thesis-verdict-chip class, which this page still uses. */
.ij-st-page .ij-thesis-verdict-chip--green {
    color: var(--ij-gain);
    background: color-mix(in srgb, var(--ij-gain) 14%, transparent);
}

.ij-st-page .ij-thesis-verdict-chip--red {
    color: var(--ij-loss);
    background: color-mix(in srgb, var(--ij-loss) 14%, transparent);
}

.ij-st-page .ij-thesis-verdict-chip--neutral {
    color: var(--ij-text-secondary);
    background: color-mix(in srgb, var(--ij-text-secondary) 14%, transparent);
}

/* --- Top bar: mark + wordmark left, "Keep your own journal" pill right --- */

.ij-st-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
    border-bottom: 1px solid var(--ij-divider);
    background: color-mix(in srgb, var(--ij-bg) 82%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ij-st-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ij-text-primary);
    text-decoration: none;
}

.ij-st-topbar-mark {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

.ij-st-topbar-name {
    font-size: 15px;
    font-weight: 600;
}

.ij-st-topbar-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 980px;
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ij-primary);
    background: color-mix(in srgb, var(--ij-primary) 12%, transparent);
    text-decoration: none;
}

/* --- Reading column --- */

.ij-st-column {
    max-width: 728px;
    margin: 0 auto;
    padding: 52px 24px 44px;
}

.ij-st-not-found {
    margin: 40px 0;
    text-align: center;
    font-size: 15px;
    color: var(--ij-text-secondary);
}

.ij-st-kicker {
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ij-text-tertiary);
}

.ij-st-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.ij-st-title {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--ij-text-primary);
}

.ij-st-ticker {
    font-size: 20px;
    font-weight: 600;
    /* #1251 — 20px/600 is NOT WCAG large text (that needs >=18.66px BOLD, i.e. 700,
       or >=24px regular), so the 4.5:1 threshold applies. Tertiary measures 2.57:1
       in light: it fails even the 3:1 large-text threshold. */
    color: var(--ij-text-secondary);
}

.ij-st-sector {
    margin-top: 7px;
    font-size: 13.5px;
    color: var(--ij-text-secondary);
}

/* --- Byline: avatar + name + snapshot date --- */

.ij-st-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.ij-st-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--ij-primary);
    background: color-mix(in srgb, var(--ij-primary) 16%, transparent);
}

.ij-st-byline-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ij-text-primary);
}

.ij-st-byline-dot {
    color: var(--ij-text-tertiary);
}

.ij-st-byline-date {
    font-size: 13.5px;
    color: var(--ij-text-secondary);
}

/* --- Verdict row: chip + target + "at X when written · +y% to target" --- */

.ij-st-verdict-row {
    margin-top: 18px;
}

.ij-st-verdict-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ij-st-target {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
}

.ij-st-target-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ij-text-primary);
}

.ij-st-target-word {
    font-size: 12.5px;
    color: var(--ij-text-secondary);
}

.ij-st-verdict-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ij-text-secondary);
}

.ij-st-verdict-sub-dot {
    margin: 0 2px;
    color: var(--ij-text-tertiary);
}

.ij-st-gain {
    font-weight: 700;
    color: var(--ij-gain);
}

.ij-st-loss {
    font-weight: 700;
    color: var(--ij-loss);
}

/* --- Sections: bull / bear / key assumptions / catalysts --- */

.ij-st-sections {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 32px;
}

.ij-st-section {
    padding-top: 14px;
}

.ij-st-section--bull {
    border-top: 2px solid var(--ij-gain);
}

.ij-st-section--bear {
    border-top: 2px solid var(--ij-loss);
}

.ij-st-section--assumptions,
.ij-st-section--catalysts {
    border-top: 1px solid var(--ij-divider);
}

.ij-st-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ij-st-section--bull .ij-st-section-label {
    color: var(--ij-gain);
}

.ij-st-section--bear .ij-st-section-label {
    color: var(--ij-loss);
}

.ij-st-section--assumptions .ij-st-section-label {
    color: var(--ij-st-indigo);
}

.ij-st-section--catalysts .ij-st-section-label {
    color: var(--ij-primary);
}

.ij-st-section-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* Reuses .ij-thesis-prose (thesis.css) for rich-markdown element styling —
   this class only overrides the type scale for the publication page. */
.ij-st-prose {
    font-size: 15.5px;
    line-height: 1.7;
}

/* --- Live context: My Data + public notes (2026-10-20). Read fresh on every load, unlike
   the frozen thesis above, so each label carries a "live" marker. --- */

.ij-st-mydata,
.ij-st-notes {
    margin-top: 32px;
    padding-top: 14px;
    border-top: 1px solid var(--ij-divider);
}

.ij-st-context-label {
    justify-content: space-between;
    color: var(--ij-text-secondary);
}

.ij-st-live {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ij-gain);
}

.ij-st-mydata-caption {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: var(--ij-text-secondary);
}

.ij-st-mydata-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ij-divider);
    font-size: 15px;
}

.ij-st-mydata-row:last-child {
    border-bottom: none;
}

.ij-st-mydata-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ij-st-mydata-value {
    flex: none;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ij-st-mydata-period {
    margin-left: 6px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--ij-text-secondary);
}

.ij-st-note {
    padding: 10px 0;
    border-bottom: 1px solid var(--ij-divider);
}

.ij-st-note:last-child {
    border-bottom: none;
}

.ij-st-note-date {
    font-size: 12.5px;
    color: var(--ij-text-secondary);
}

.ij-st-note-text {
    margin: 3px 0 0;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Same link treatment as .ij-thesis-prose a, but on --ij-primary: this SSR page has no
   MudThemeProvider, so --mud-palette-primary is undefined here. */
.ij-st-note-text a {
    color: var(--ij-primary);
    text-decoration: none;
}

.ij-st-note-text a:hover {
    text-decoration: underline;
}

/* --- Disclaimer --- */

.ij-st-disclaimer {
    margin: 34px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--ij-divider);
    font-size: 12.5px;
    line-height: 1.55;
    /* #1251 — the financial disclaimer, on the page users share PUBLICLY. Legally
       meaningful text was rendering at 2.57:1 light / 3.07:1 dark. If a disclaimer
       is worth showing, it is worth being readable. */
    color: var(--ij-text-secondary);
}

/* --- CTA card --- */

.ij-st-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--ij-bg-gray);
}

.ij-st-cta-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ij-st-cta-mark {
    display: block;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
}

.ij-st-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ij-st-cta-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ij-text-primary);
}

.ij-st-cta-body {
    max-width: 420px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ij-text-secondary);
}

.ij-st-cta-btn {
    flex: none;
    border-radius: 980px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--ij-primary);
    text-decoration: none;
    white-space: nowrap;
}

/* --- Footer --- */

.ij-st-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
    font-size: 11.5px;
    /* #1251 — carries the Disclaimer and Privacy Policy links. Interactive, and the
       entire point is that a reader can FIND them. Same defect #1243 fixed on the
       landing / /pro footer. */
    color: var(--ij-text-secondary);
}

.ij-st-footer-spacer {
    flex: 1;
}

.ij-st-footer a {
    color: inherit;
    text-decoration: none;
}

.ij-st-footer a:hover {
    text-decoration: underline;
}

/* --- Phone (≤640px) --- */

@media (max-width: 640px) {
    .ij-st-topbar {
        height: 52px;
        padding: 0 18px;
    }

    .ij-st-column {
        padding: 30px 22px;
    }

    .ij-st-title {
        font-size: 26px;
    }

    .ij-st-ticker {
        font-size: 16px;
    }

    .ij-st-kicker {
        font-size: 10.5px;
    }

    .ij-st-avatar {
        width: 26px;
        height: 26px;
    }

    .ij-st-prose {
        font-size: 15px;
        line-height: 1.65;
    }

    .ij-st-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .ij-st-cta-btn {
        align-self: stretch;
        text-align: center;
    }
}
