:root {
    --pg-site-max: 1200px;
    --pg-reading-max: 720px;
    --pg-wide-max: 980px;
    --pg-gutter-desktop: 20px;
    --pg-gutter-mobile: 16px;
}

/* PAGE BACKGROUND */
.pg-page {
    background-image: url('https://persodia.org/wp-content/uploads/2026/02/cover-background.png');
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
    padding-bottom: 48px;
}

/* SHARED SITE WIDTH */
.site-header,
.pg-wrap,
.site-footer,
.wp-block-template-part,
header .wp-block-group.alignfull,
footer .wp-block-group.alignfull {
    max-width: var(--pg-site-max);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    padding-left: var(--pg-gutter-desktop);
    padding-right: var(--pg-gutter-desktop);
}

/* SINGLE POST READING WIDTH */
.single .wp-block-post-title,
.single .wp-block-post-content,
.single main .wp-block-group.is-layout-constrained > .wp-block-post-title,
.single main .wp-block-group.is-layout-constrained > .wp-block-post-content {
    max-width: var(--pg-reading-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Make default inner blocks read nicely */
.single .wp-block-post-content > * {
    max-width: var(--pg-reading-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Allow deliberate wider blocks */
.single .wp-block-post-content > .alignwide {
    max-width: var(--pg-wide-max);
}

.single .wp-block-post-content > .alignfull {
    max-width: var(--pg-site-max);
}

/* Images and embeds behave */
.single .wp-block-image img,
.single .wp-block-post-content img,
.single .wp-block-post-content iframe,
.single .wp-block-post-content video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Basic editorial rhythm */
.single .wp-block-post-content > * + * {
    margin-top: 1.25rem;
}

.single .wp-block-post-content h2,
.single .wp-block-post-content h3,
.single .wp-block-post-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.single .wp-block-post-content p,
.single .wp-block-post-content li {
    line-height: 1.7;
}

/* HERO */
.pg-hero {
    padding-top: 40px;
    padding-bottom: 20px;
    padding-left: var(--pg-gutter-desktop);
    padding-right: var(--pg-gutter-desktop);
}

.pg-hero-inner {
    max-width: var(--pg-site-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.pg-hero-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pg-hero-logo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0097A7;
    margin: 0 0 10px 0;
}

.pg-hero-title {
    font-family: "EB Garamond", serif;
    font-size: 26px;
    font-weight: 700;
    color: #0C223F;
    line-height: 1.25;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0f4f6;
}

.pg-hero-sub {
    font-size: 13px;
    color: #5a7a9a;
    margin: 0 0 16px 0;
    letter-spacing: 0.04em;
}

.pg-hero-book-wrap {
    flex: 0 0 260px;
    width: 260px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pg-hero-book-caption {
    font-size: 15px;
    color: #4a657d;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.5;
    margin: 0;
}

.pg-hero-book {
    flex-shrink: 0;
    width: 120px;
    display: block;
    text-decoration: none;
}

.pg-hero-book img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
    box-shadow: 0 4px 16px rgba(12, 34, 63, 0.18);
}

/* LEGEND */
.pg-legend {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.2;
}

.pg-legend-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.pg-legend-label {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0C223F;
    opacity: 0.45;
    min-width: 56px;
}

.pg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #444;
}

.pg-legend-item svg {
    width: 14px;
    height: 14px;
    stroke: #0097A7;
    stroke-width: 1.8;
    fill: none;
}

.pg-legend-item .pg-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
}

/* GRID */
.pg-wrap {
    width: 100%;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 48px;
}

.pg-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
}

.pg-cell {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(80px, auto) 1fr;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid #0097A7;
    padding: 14px;
    box-sizing: border-box;
    border-radius: 3px;
    box-shadow: 0 1px 6px rgba(0, 151, 167, 0.10);
}

.pg-cell-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 10px 0;
    min-width: 0;
}

.pg-cell-icon-left {
    width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.pg-cell-icon-left svg {
    width: 34px;
    height: 34px;
    stroke: #0097A7;
    stroke-width: 1.4;
    fill: none;
    display: block;
}

.pg-cell-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pg-layer {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.pg-constraint {
    font-family: "EB Garamond", serif;
    font-size: 18px;
    font-weight: 700;
    color: #0C223F;
    margin: 0;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.pg-description {
    font-size: 14px;
    line-height: 1.4;
    color: #888;
    margin: 0;
}

.pg-list {
    list-style: none;
    margin: 12px 0 0 0;
    padding: 8px 0 0 0;
    border-top: 1px solid #e0f4f6;
    align-self: start;
}

.pg-list li {
    font-size: 12px;
    line-height: 1.5;
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.pg-list li a {
    text-decoration: none;
    color: #0C223F;
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.pg-list li a:hover {
    color: #0097A7;
}

.pg-title-inline {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.pg-title-inline--inactive {
    cursor: default;
    opacity: 0.8;
}

/* STATUS DOTS */
.pg-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
    margin-left: 4px;
}

.pg-dot--published {
    background: #2e7d32;
}

.pg-dot--review {
    background: #f9a825;
}

.pg-dot--draft {
    background: #d3d3d3;
}

.pg-dot--scheduled {
    background: transparent;
    border: 1.5px solid #bbb;
}

/* Type icon */
.pg-type-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    width: 16px;
    height: 16px;
}

.pg-type-icon svg {
    width: 13px;
    height: 13px;
    stroke: #0097A7;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}

/* NEW badge */
.pg-badge-new {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: red;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.pg-empty {
    font-size: 11px;
    color: #aaa;
    margin: 6px 0 0 0;
}

/* CAPTION */
.pg-caption {
    width: 100%;
    margin: 18px auto 0;
    box-sizing: border-box;
}

.pg-caption p {
    max-width: 980px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7785;
}

.pg-caption strong {
    font-weight: 600;
    color: #4f5e70;
}

/* FOOTER / NAVIGATION */
footer .wp-block-navigation .wp-block-navigation-item__content,
footer .wp-block-navigation .wp-block-navigation-item__label,
footer .wp-block-navigation a,
.wp-block-navigation .wp-block-navigation-item__label {
    font-size: 14px !important;
    font-weight: 400;
    text-decoration: none;
}

/* Header inner layout */
.site-header-inner {
    max-width: var(--pg-site-max);
    margin: 0 auto;
    padding-left: var(--pg-gutter-desktop);
    padding-right: var(--pg-gutter-desktop);
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

/* TABLET */
@media (max-width: 900px) {
    .pg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pg-hero-inner {
        gap: 28px;
    }

    .pg-hero-book-wrap {
        width: 220px;
        flex-basis: 220px;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .pg-hero {
        padding-top: 32px;
        padding-bottom: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .pg-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .pg-hero-text {
        width: 100%;
    }

    .pg-hero-title {
        font-size: 20px;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }

    .pg-hero-sub {
        margin-bottom: 12px;
    }

    .pg-legend {
        align-items: center;
    }

    .pg-legend-row {
        justify-content: center;
    }

    .pg-hero-book-wrap {
        width: 100%;
        flex-basis: auto;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .pg-hero-book {
        width: 140px;
    }

    .pg-wrap {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 12px;
        padding-bottom: 32px;
    }

    .pg-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .single .wp-block-post-title,
    .single .wp-block-post-content,
    .single .wp-block-post-content > * {
        padding-left: var(--pg-gutter-mobile);
        padding-right: var(--pg-gutter-mobile);
    }

    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
        padding-left: var(--pg-gutter-mobile);
        padding-right: var(--pg-gutter-mobile);
    }

    .site-header-logo,
    .site-header-tagline {
        margin: 0;
        text-align: left;
    }
}
/* 1. Reset the UL container to remove default browser indentation */
.pg-list {
    list-style: none;
    margin: 12px 0 0 0;
    padding: 8px 0 0 0; /* Ensures top padding only, 0 on left/right */
    border-top: 1px solid #e0f4f6;
    align-self: start;
}

/* 2. Adjust the LI spacing and alignment */
.pg-list li {
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    
    /* Spacing Adjustment: No space before, clear space after */
    padding-top: 0;
    padding-bottom: 8px; 
    
    /* Ensure no horizontal shift on mobile */
    margin-left: 0;
    padding-left: 0;
}

/* 3. Clean up the last item in the box */
.pg-list li:last-child {
    padding-bottom: 0;
}
/* 1. The UL Container Fix */
.pg-list {
    list-style: none;
    margin: 12px 0 0 0 !important; /* Force zero margin-left */
    padding: 8px 0 0 0 !important;  /* Force zero padding-left */
    border-top: 1px solid #e0f4f6;
    align-self: start;
    width: 100%;                /* Forces it to fill the cell correctly */
    box-sizing: border-box;
}

/* 2. The LI Item Fix */
.pg-list li {
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    
    /* Spacing: 0 before, 8px after */
    padding-top: 0;
    padding-bottom: 8px;
    
    /* Absolute reset for iPhone */
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;   /* Kills any leftover list-style indent */
}

/* 3. Cleanup */
.pg-list li:last-child {
    padding-bottom: 0;
}