:root {
    /* Primary: royal blue. Secondary: school gold. */
    --ptc-blue: #2447c9;
    --ptc-blue-dark: #1a3496;
    --ptc-blue-tint: rgba(36, 71, 201, 0.09);
    --ptc-gold: #f0b323;
    --ptc-gold-dark: #b47d05;
    --ptc-ink: #1f242c;
    --ptc-muted: #5c6470;
    --ptc-line: #e3e6ea;
    --ptc-surface: #ffffff;
    --ptc-surface-alt: #f5f7fb;
}

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--ptc-ink);
    background-color: var(--ptc-surface-alt);
}

a {
    color: var(--ptc-blue);
}

/* Page furniture */

.page-heading {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
}

    .page-heading:focus {
        outline: none;
    }

.page-intro {
    margin: 0 0 2rem;
    color: var(--ptc-muted);
    max-width: 60ch;
}

/* Home page tiles */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1.75rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--ptc-ink);
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

    .tile:hover, .tile:focus-visible {
        transform: translateY(-3px);
        border-color: var(--ptc-blue);
        box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
    }

    .tile:focus-visible {
        outline: 3px solid var(--ptc-gold);
        outline-offset: 2px;
    }

.tile-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ptc-blue-tint);
    color: var(--ptc-blue);
}

.ptc-icon {
    width: 32px;
    height: 32px;
}

.tile-label {
    font-weight: 600;
    line-height: 1.3;
}

.tile-badge {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ptc-muted);
}

/* Calendar page */

.section-heading {
    margin: 2.5rem 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.calendar-embed {
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

    .calendar-embed iframe {
        display: block;
        width: 100%;
        height: 640px;
        border: 0;
    }

@media (max-width: 640px) {
    .calendar-embed iframe {
        height: 480px;
    }
}

.action-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--ptc-ink);
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .action-card:hover, .action-card:focus-visible {
        border-color: var(--ptc-blue);
        box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
    }

    .action-card:focus-visible {
        outline: 3px solid var(--ptc-gold);
        outline-offset: 2px;
    }

.action-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 50%;
    background: var(--ptc-blue-tint);
    color: var(--ptc-blue);
}

    .action-icon .ptc-icon {
        width: 28px;
        height: 28px;
    }

.action-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.action-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.action-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: var(--ptc-gold);
    color: #4a3200;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: 0.1em;
}

.action-desc {
    color: var(--ptc-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Budget page */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 14px;
}

.stat-accent {
    background: var(--ptc-blue);
    border-color: var(--ptc-blue);
    color: #fff;
}

.stat-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ptc-blue);
}

.stat-accent .stat-value {
    color: var(--ptc-gold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--ptc-muted);
}

.stat-accent .stat-label {
    color: rgba(255, 255, 255, 0.85);
}

.chart-hint {
    margin: -0.5rem 0 1.25rem;
    color: var(--ptc-muted);
    font-size: 0.95rem;
}

.budget-list {
    display: grid;
    gap: 0.75rem;
}

.budget-row {
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.budget-row-open {
    border-color: var(--ptc-blue);
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

.budget-row-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 1rem 1.25rem 0.75rem;
    background: none;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .budget-row-head:hover .budget-row-name {
        color: var(--ptc-blue);
    }

    .budget-row-head:focus-visible {
        outline: 3px solid var(--ptc-gold);
        outline-offset: -3px;
    }

.budget-swatch {
    width: 14px;
    height: 14px;
    flex: none;
    border-radius: 4px;
}

.budget-row-name {
    flex: 1;
    font-weight: 700;
}

.budget-row-amount {
    font-weight: 700;
    color: var(--ptc-blue);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.budget-row-share {
    min-width: 3.5rem;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ptc-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.budget-chevron {
    display: grid;
    place-items: center;
    flex: none;
    color: var(--ptc-muted);
    transition: transform 0.2s ease;
}

    .budget-chevron .ptc-icon {
        width: 18px;
        height: 18px;
    }

.budget-row-open .budget-chevron {
    transform: rotate(180deg);
    color: var(--ptc-blue);
}

.budget-bar {
    height: 8px;
    margin: 0 1.25rem 1rem;
    border-radius: 999px;
    background: var(--ptc-blue-tint);
    overflow: hidden;
}

.budget-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.budget-row-body {
    padding: 0 1.25rem 1.35rem;
}

.budget-summary {
    margin: 0 0 1rem;
    color: var(--ptc-muted);
    line-height: 1.5;
}

.budget-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

    .budget-items li {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.4rem 0;
        border-top: 1px solid var(--ptc-line);
        font-size: 0.95rem;
    }

.budget-item-amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--ptc-muted);
}

.budget-note {
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--ptc-gold);
    background: var(--ptc-surface);
    border-radius: 0 10px 10px 0;
    color: var(--ptc-muted);
}

/* Meetings page */

.next-meeting {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 1.1rem 1.4rem;
    background: var(--ptc-blue);
    color: #fff;
    border-radius: 14px;
}

.next-meeting-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ptc-gold);
}

.next-meeting-when {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.75rem;
}

.next-meeting-date {
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 700;
}

.next-meeting-time {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.upcoming {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.9rem;
    margin-top: 0.9rem;
    padding: 0 0.25rem;
}

.upcoming-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ptc-muted);
}

.upcoming-dates {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

    .upcoming-dates li {
        padding: 0.2rem 0.6rem;
        border-radius: 999px;
        background: var(--ptc-blue-tint);
        color: var(--ptc-blue);
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
    }

.meeting-year {
    margin-top: 0.5rem;
}

.meeting-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.meeting-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 12px;
}

.meeting-date {
    font-weight: 600;
}

.meeting-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--ptc-line);
    background: var(--ptc-surface-alt);
    color: var(--ptc-blue);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .doc-link .ptc-icon {
        width: 16px;
        height: 16px;
    }

    a.doc-link:hover, a.doc-link:focus-visible {
        border-color: var(--ptc-blue);
        background: var(--ptc-blue-tint);
    }

.doc-link-empty {
    color: var(--ptc-muted);
    font-weight: 500;
}

.doc-link-note {
    font-weight: 400;
    font-style: italic;
}

/* Board page */

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.board-card {
    display: flex;
    flex-direction: column;
    background: var(--ptc-surface);
    border: 1px solid var(--ptc-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.board-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    background: var(--ptc-surface-alt);
    display: block;
}

.board-role {
    margin: 1rem 1rem 0.15rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ptc-blue);
    font-weight: 700;
}

.board-name {
    margin: 0 1rem 1.15rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

/* Framework bits */

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 8px;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
