

.pf {
    
    --empire: var(--accent);
    --empire-rgb: 255, 180, 87;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 26px 18px 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    
    scroll-margin-top: 84px;
}

.pf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.pf-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
}

.pf-share {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.pf-share-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: none;
    background: none;
    line-height: 0;
    color: var(--text-dim);
    cursor: pointer;
}

.pf-share-btn:hover {
    color: var(--text-dim);
    text-decoration: none;
}

.pf-share-btn svg {
    display: block;
}

.pf-share-copy.is-copied::after {
    content: "Copied";
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--text-bright);
    color: var(--bg);
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
}

.pf-crest {
    line-height: 0;
}

.pf-crest svg {
    display: block;
    width: 88px;
    height: 88px;
}

.pf-id {
    flex: 1 1 280px;
    min-width: 0;
}

.pf-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-name {
    margin: 0 0 6px;
    font-weight: 300;
    font-size: clamp(26px, 3.2vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text-bright);
    overflow-wrap: break-word;
}

.premium-badge {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--accent);
}

.pf-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    margin: 0;
    font-size: 14px;
    color: var(--text-dim);
}

.pf-sub > span + span::before {
    content: "\00b7";
    margin: 0 8px;
}

.pf-government {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-government svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.pf-summary {
    max-width: 72ch;
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

.pf-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
}

.pf-tiles > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 6px;
    padding: 14px 16px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    
    border-top: 2px solid var(--empire);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.pf-tiles dt {
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim-panel);
}

.pf-tiles dd {
    margin: 0;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pf-tiles dd a,
.pf-tiles dd a:hover {
    color: inherit;
    cursor: pointer;
}

.pf-tiles dt a {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 0.1875rem;
    cursor: pointer;
}

.pf-activity {
    height: 38px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.pf-activity .news-strip-tag {
    border-right-color: var(--panel-border);
    cursor: default;
}

.pf-activity .news-strip-dot {
    background: var(--empire);
}

.pf-activity .news-strip-item a:hover {
    color: var(--text-bright);
    text-decoration: none;
}

.pf-mid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    align-items: start;
}

.pf-main,
.pf-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.pf-mid > .pf-side:only-child {
    grid-column: 1 / -1;
}

.is-authed .pf-mid:not(:has(.pf-side > .pf-panel)) {
    grid-template-columns: 1fr;
}

.is-authed .pf-side:not(:has(> .pf-panel)) {
    display: none;
}

.pf-main > *,
.pf-side > * {
    min-width: 0;
}

.pf-panel {
    padding: 22px 24px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.pf-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--accent);
}

.pf-eyebrow::before {
    content: "";
    flex: none;
    width: 11px;
    height: 12px;
    background: var(--empire);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.pf-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.pf-map-head .pf-eyebrow {
    margin: 0;
}

.pf-map-link {
    flex: none;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-dim-panel);
    white-space: nowrap;
    cursor: pointer;
}

.pf-table td a {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 0.1875rem;
    cursor: pointer;
}

.pf-chart-note,
.pf-cta-note {
    margin: 12px 0 0;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-dim-panel);
}

.pf-chart {
    margin: 0;
    padding: 0;
    height: 440px;
    background: #0a0e14;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    overflow: hidden;
    
    position: relative;
}

.map-embed-fallback {
    width: 100%;
    height: 100%;
}

.pf-chart img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-table {
    width: 100%;
    border-collapse: collapse;
    
    table-layout: fixed;
}

.pf-table col.pf-col-score {
    width: 104px;
}

.pf-table th {
    text-align: left;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--panel-border);
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim-panel);
}

.pf-table th.pf-num {
    text-align: right;
}

.pf-table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--panel-border);
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}

.pf-table td:first-child {
    overflow-wrap: anywhere;
}

.pf-table tbody tr:last-child td {
    border-bottom: none;
}

.pf-num {
    text-align: right;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pf-more {
    margin: 14px 0 0;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-dim-panel);
}

.pf-table-split tbody tr:last-child td {
    border-bottom: 1px solid var(--panel-border);
}

.pf-systems-more > summary {
    
    cursor: pointer;
    padding: 12px 0 0;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-dim-panel);
    
}

.pf-systems-more[open] > summary {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--panel-border);
}

.pf-systems-more thead th {
    padding: 0;
    border: 0;
    height: 0;
    line-height: 0;
    font-size: 0;
    color: transparent;
    overflow: hidden;
}

.pf-neighbors {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-neighbors a {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.pf-neighbors a:hover {
    color: var(--text);
    text-decoration: none;
}

.pf-sectors {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-sectors li {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--panel-border);
}

.pf-sectors li:last-child {
    border-bottom: none;
}

.pf-sector-name {
    min-width: 0;
    font-size: 14px;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-sector-bonus {
    margin-left: auto;
    padding-left: 16px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 12px;
    color: var(--text-dim-panel);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .pf-mid {
        grid-template-columns: 1fr;
    }

    .pf-interleave {
        display: flex;
        flex-direction: column;
    }

    .pf-interleave > .pf-main,
    .pf-interleave > .pf-side {
        display: contents;
    }

    .pf-interleave > .pf-main > * {
        order: 3;
    }

    .pf-interleave > .pf-main > .pf-territory {
        order: 1;
    }

    .pf-interleave > .pf-side > * {
        order: 2;
    }

    .pf-chart {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 620px) {
    
    .pf-share {
        margin-left: -4px;
        flex-basis: 100%;
    }

    .pf-crest svg {
        width: 72px;
        height: 72px;
    }

    .pf-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pf-tiles dd {
        font-size: 20px;
    }

    .pf-panel {
        padding: 20px 18px;
    }

    .pf-sectors li {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .pf-sector-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .pf-sector-bonus {
        margin-left: 0;
        padding-left: 0;
    }

    .pf-table col.pf-col-score {
        width: 84px;
    }
}
