/* =====================================================================
   Gartproject — factsheet UI
   Light, hairline-based. No heavy boxes/shadows: thin rules, colored section
   accents (the "stripe colors") and faint tints. Self-contained type +
   armored against host-theme bleed. Works inline and in a sidebar.
   ===================================================================== */

.gtp-card {
    --g-bg: #ffffff;
    --g-soft: #f6f8fb;
    --g-line: #e7ebf1;
    --g-line-2: #eef1f6;
    --g-ink: #0e1626;
    --g-ink-2: #3f4b60;
    --g-mut: #8b93a4;
    --g-acc: #0f9488;

    /* default section accent (overridden per .gtp-sec--*) */
    --sec: #0f9488;
    --sec-bg: #f1faf9;

    box-sizing: border-box;
    margin: 1.4em 0;
    padding: 6px 18px 16px;
    background: var(--g-bg);
    border: 1px solid var(--g-line);
    border-radius: 12px;
    color: var(--g-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Armor against the host theme. !important on exactly the props themes
   override in content/sidebar areas (list markers + indents, heading
   margins/borders/backgrounds/fonts, link underline + color). */
.gtp-card,
.gtp-card *,
.gtp-card *::before,
.gtp-card *::after {
    box-sizing: border-box !important;
}

.gtp-card {
    max-width: none !important;
    float: none !important;
}

.gtp-card h2, .gtp-card h3, .gtp-card h4,
.gtp-card p, .gtp-card ul, .gtp-card ol, .gtp-card li, .gtp-card figure, .gtp-card blockquote {
    font-family: inherit;
    text-align: left;
    text-transform: none;
    float: none;
}

.gtp-card ul, .gtp-card ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.gtp-card li {
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

.gtp-card p {
    margin: 0 !important;
}

.gtp-card h2, .gtp-card h3, .gtp-card h4 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-family: inherit !important;
}

.gtp-card a {
    text-decoration: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

.gtp-card svg {
    vertical-align: middle;
}

.gtp-fs {
    padding: 4px 20px 18px;
}

/* Per-section accent colours — the "stripes" we play with. */
.gtp-sec--summary {
    --sec: #0f9488;
    --sec-bg: #f1faf9;
}

.gtp-sec--facts {
    --sec: #15a34a;
    --sec-bg: #f1faf4;
}

.gtp-sec--numbers {
    --sec: #0f9488;
    --sec-bg: #f1faf9;
}

.gtp-sec--timeline {
    --sec: #2563eb;
    --sec-bg: #f2f6fe;
}

.gtp-sec--entities {
    --sec: #7c3aed;
    --sec-bg: #f7f4fe;
}

.gtp-sec--angle {
    --sec: #ef6c2e;
    --sec-bg: #fff7ef;
}

.gtp-sec--sources {
    --sec: #475569;
    --sec-bg: #f4f6f9;
}

/* Headings ----------------------------------------------------------- */
.gtp-card h2 {
    font-size: 18px !important;
    font-weight: 750 !important;
    letter-spacing: -.015em !important;
    line-height: 1.2 !important;
    color: var(--g-ink) !important;
}

.gtp-card h3 {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    color: var(--g-mut) !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px !important;
}

.gtp-card h4 {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    color: var(--g-mut) !important;
    line-height: 1.2 !important;
    margin: 0 0 9px !important;
}

/* Eyebrow icon — just a coloured glyph, no tile (the section's stripe colour). */
.gtp-fs__h-ico {
    display: inline-flex;
    color: var(--sec);
}

.gtp-fs__h-ico svg {
    display: block;
    width: 14px;
    height: 14px;
}

.gtp-fs__h4-ico {
    display: inline-flex;
    color: var(--sec);
}

.gtp-fs__h4-ico svg {
    display: block;
    width: 12px;
    height: 12px;
}

.gtp-ico {
    flex: none;
}

.gtp-card a:focus-visible, .gtp-card__more:focus-visible {
    outline: 2px solid var(--sec);
    outline-offset: 2px;
    border-radius: 5px;
}

/* Inline-panel header — hairline, no card-in-card --------------------- */
.gtp-fs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--g-line);
}

.gtp-fs__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gtp-fs__icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--g-acc);
    color: #fff;
    border-radius: 8px;
    flex: none;
}

.gtp-fs__icon svg {
    width: 18px;
    height: 18px;
}

.gtp-fs__badge {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--g-mut);
    font-weight: 600;
}

.gtp-fs__badge strong {
    font-size: 15px;
    color: var(--g-acc);
}

.gtp-fs__badge span {
    font-size: 11px;
}

/* Sections: hairline-separated, no boxes ----------------------------- */
.gtp-fs .gtp-fs__section {
    padding: 16px 0;
    border-top: 1px solid var(--g-line-2);
}

.gtp-fs .gtp-fs__head + .gtp-fs__section {
    border-top: 0;
}

.gtp-card.gtp-fs__section {
    margin: 1.4em 0;
}

/* Prose callouts (summary, angle): faint tint + coloured stripe ------- */
.gtp-fs__summary, .gtp-fs__angle {
    background: var(--sec-bg);
    border-left: 3px solid var(--sec);
    border-radius: 0 8px 8px 0;
    padding: 13px 15px;
}

.gtp-fs .gtp-fs__summary, .gtp-fs .gtp-fs__angle {
    border-top: 0;
    margin: 14px 0;
    padding: 14px;
}

.gtp-fs__summary p, .gtp-fs__angle p {
    color: var(--g-ink-2);
    font-size: 14px;
    line-height: 1.6;
}

/* Clamp / "Zobraziť viac" -------------------------------------------- */
.gtp-card__body {
    position: relative;
    transition: max-height .32s ease;
}

.gtp-is-clamped .gtp-card__body {
    overflow: hidden;
}

.gtp-is-clamped:not(.gtp-is-open) .gtp-card__body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--g-bg) 96%);
    pointer-events: none;
}

.gtp-card.gtp-card--summary.gtp-fs__section.gtp-sec--summary.gtp-fs__summary.gtp-card--clampable.gtp-is-clamped {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #f1faf9 96%);
}

.gtp-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .02em;
    color: var(--sec);
    background: none;
    border: 0;
    cursor: pointer;
}

.gtp-card__more:hover {
    text-decoration: underline !important;
}

.gtp-card__more::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin: -3px 0 0;
    transition: transform .2s ease;
}

.gtp-is-open .gtp-card__more::after {
    transform: rotate(-135deg);
    margin: 3px 0 0;
}

/* Key facts — colored index, hairline rows --------------------------- */
.gtp-fs__facts {
    display: grid;
    gap: 0;
}

.gtp-card .gtp-fs__fact {
    position: relative;
    counter-increment: gtp-fact;
    padding: 11px 0 11px 26px !important;
    border-top: 1px solid var(--g-line-2);
}

.gtp-fs__facts > .gtp-fs__fact:first-child {
    border-top: 0 !important;
    padding-top: 1px !important;
}

.gtp-fs__fact::before {
    content: counter(gtp-fact);
    position: absolute;
    top: 11px;
    left: 0;
    color: var(--sec);
    font-weight: 800;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.gtp-fs__facts {
    counter-reset: gtp-fact;
}

.gtp-fs__fact-claim {
    color: var(--g-ink);
    line-height: 1.5;
}

.gtp-fs__fact-src {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--g-mut) !important;
}

.gtp-fs__fact-src:hover {
    color: var(--sec) !important;
}

.gtp-fs__fact-src-ico {
    display: inline-flex;
}

.gtp-fs__fact-src-text {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: baseline;
    line-height: 1.3;
}

.gtp-fs__fact-src-title {
    font-weight: 600;
}

.gtp-fs__fact-src-host {
    font-size: 10.5px;
    opacity: .7;
}

/* Key numbers — compact ruled list (no tiles) ------------------------ */
.gtp-fs__numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    column-gap: 22px;
}

.gtp-fs__num {
    padding: 8px 0;
    border-top: 1px solid var(--g-line-2);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gtp-fs__num-val {
    font-size: 15px;
    font-weight: 750;
    color: var(--sec);
    line-height: 1.25;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.gtp-fs__num-ctx {
    font-size: 11.5px;
    color: var(--g-ink-2);
    line-height: 1.4;
}

.gtp-fs__num-src {
    font-size: 10.5px;
    color: var(--g-mut) !important;
    margin-top: 1px;
}

.gtp-fs__num-src:hover {
    color: var(--sec) !important;
}

/* Timeline — thin rail, small dots ----------------------------------- */
.gtp-fs__timeline {
    position: relative;
}

.gtp-fs__timeline::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 1.5px;
    background: var(--g-line);
}

.gtp-card .gtp-fs__tl-item {
    position: relative;
    padding: 0 0 13px 22px !important;
}

.gtp-fs__tl-item:last-child {
    padding-bottom: 0 !important;
}

.gtp-fs__tl-dot {
    position: absolute;
    left: 0;
    top: 3px;
    width: 9px;
    height: 9px;
    background: var(--g-bg);
    border: 2px solid var(--sec);
    border-radius: 50%;
}

.gtp-fs__tl-date {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sec);
    margin-bottom: 2px;
}

.gtp-fs__tl-event {
    color: var(--g-ink);
    line-height: 1.5;
}

/* Entities — light chips --------------------------------------------- */
.gtp-fs__ent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px 18px;
}

.gtp-fs__ent-group h4 {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gtp-fs__ent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gtp-fs__ent-list--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.gtp-fs__ent-list li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: flex-start;
}

.gtp-fs__ent-list--inline li {
    display: inline-flex;
}

.gtp-fs__tag {
    display: inline-block;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    background: var(--g-soft);
    border: 1px solid var(--g-line);
    border-radius: 6px;
    color: var(--g-ink);
    transition: border-color .15s, color .15s;
}

a.gtp-fs__tag:hover {
    border-color: var(--sec);
    color: var(--sec) !important;
}

.gtp-fs__ent-role {
    font-size: 11px;
    color: var(--g-mut);
    line-height: 1.35;
}

/* Sources — hairline rows -------------------------------------------- */
.gtp-fs__src-list {
    display: flex;
    flex-direction: column;
}

.gtp-fs__src-link {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 9px 0;
    border-top: 1px solid var(--g-line-2);
}

.gtp-fs__src-list .gtp-fs__src:first-child .gtp-fs__src-link {
    border-top: 0;
}

.gtp-fs__src-link:hover .gtp-fs__src-title {
    color: var(--sec);
}

.gtp-fs__src-fav {
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 1px;
    border-radius: 4px;
    background: #fff;
}

.gtp-fs__src-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.gtp-fs__src-title {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.35;
    color: var(--g-ink);
    transition: color .15s;
}

.gtp-fs__src-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    font-size: 10.5px;
    color: var(--g-mut);
}

.gtp-fs__src-host {
    font-weight: 500;
}

.gtp-fs__src-pub::before {
    content: "·";
    margin-right: 5px;
}

.gtp-fs__src-lang, .gtp-fs__src-cred {
    padding: 0 5px;
    border-radius: 3px;
    background: var(--g-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gtp-fs__src-cred--high {
    color: #166534;
}

.gtp-fs__src-cred--medium {
    color: #92400e;
}

.gtp-fs__src-cred--low {
    color: #b91c1c;
}

/* Teaser fade matches a tinted callout's own background. */
.gtp-fs__summary .gtp-card__body::after,
.gtp-fs__angle .gtp-card__body::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--sec-bg) 96%);
}

/* Popup (opened by "Zobraziť viac") ---------------------------------- */
.gtp-modal[hidden] {
    display: none;
}

.gtp-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.gtp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 30, .55);
}

.gtp-modal__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px -16px rgba(0, 0, 0, .45);
    -webkit-overflow-scrolling: touch;
}

.gtp-modal__content.gtp-card {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 22px 24px 24px;
}

.gtp-modal__content .gtp-card__body {
    overflow: visible !important;
    max-height: none !important;
}

.gtp-modal__content .gtp-card__more {
    display: none !important;
}

.gtp-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: var(--g-mut);
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.gtp-modal__close:hover {
    background: var(--g-soft);
    color: var(--g-ink);
}

@media (prefers-color-scheme: dark) {
    .gtp-modal__panel {
        background: #0f1729;
    }
}

/* Debug marker (only rendered in debug mode) ------------------------- */
.gtp-fs__debug {
    margin-top: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0;
    text-transform: none;
}

/* Inline-panel footer ------------------------------------------------ */
.gtp-fs__foot {
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--g-line-2);
    color: var(--g-mut);
    font-size: 11px;
    text-align: center;
}

/* Responsive --------------------------------------------------------- */
@media (max-width: 600px) {
    .gtp-fs {
        padding: 4px 15px 15px;
    }

    .gtp-card {
        padding: 6px 15px 15px;
    }

    .gtp-fs__numbers {
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
    }
}

/* Dark mode ---------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .gtp-card {
        --g-bg: #0f1729;
        --g-soft: #18233a;
        --g-line: #29354c;
        --g-line-2: #1f2b41;
        --g-ink: #eef2f9;
        --g-ink-2: #b6c0d4;
        --g-mut: #8794ab;
    }

    .gtp-sec--summary {
        --sec-bg: rgba(15, 148, 136, .12);
    }

    .gtp-sec--facts {
        --sec-bg: rgba(21, 163, 74, .12);
    }

    .gtp-sec--timeline {
        --sec-bg: rgba(37, 99, 235, .12);
    }

    .gtp-sec--entities {
        --sec-bg: rgba(124, 58, 237, .14);
    }

    .gtp-sec--angle {
        --sec-bg: rgba(239, 108, 46, .12);
    }

    .gtp-sec--sources {
        --sec-bg: rgba(71, 85, 105, .16);
    }

    .gtp-is-clamped:not(.gtp-is-open) .gtp-card__body::after {
        background: linear-gradient(to bottom, rgba(15, 23, 41, 0), var(--g-bg) 96%);
    }
}
