/* ============================================================
 * components.css — reusable widgets used across pages:
 *   analytics-hero, metric-tile, target-tile, target-ring,
 *   home-actions, latest-round-card, import widgets,
 *   panels, charts, accessibility (high contrast / reduced
 *   motion / print).
 *
 * If a class is referenced from more than one page, it
 *   belongs here. Page-specific layout lives in pages.css.
 * ============================================================ */

/* Analytics layer */
.analytics-hero {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: space-between;
    padding: 1.5rem;
}

.analytics-hero.compact {
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
}

.analytics-hero h1 {
    color: #030712;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.15;
}

.analytics-kicker {
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.analytics-subtitle {
    color: #4b5563;
    font-size: 1rem;
    margin-top: 0.5rem;
    max-width: 48rem;
}

.analytics-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.analytics-hero-meta span,
.analytics-link {
    align-items: center;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

.analytics-link {
    white-space: nowrap;
}

.analytics-link:hover {
    background: #ffffff;
    color: #15803d;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}

.home-action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #374151;
    display: flex;
    font-weight: 800;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    text-align: center;
    touch-action: manipulation;
    width: 100%;
}

.home-action.primary {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.home-action:hover {
    border-color: #16a34a;
    color: #15803d;
}

.home-action.primary:hover {
    background: #166534;
    color: #ffffff;
}

.analytics-metrics {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-tile {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 8rem;
    padding: 1rem;
}

.metric-label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.metric-tile strong {
    color: #030712;
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.metric-note {
    color: #6b7280;
    display: -webkit-box;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.analytics-grid {
    display: grid;
    gap: 1.5rem;
}

.home-workflow {
    display: grid;
    gap: 0.75rem;
}

.home-workflow a {
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #111827;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: auto 1fr;
    padding: 0.875rem;
}

.home-workflow a:hover {
    background: #f9fafb;
    border-color: #bbf7d0;
}

.home-workflow span {
    align-items: center;
    background: #15803d;
    border-radius: 999px;
    color: #ffffff;
    display: flex;
    font-size: 0.75rem;
    font-weight: 800;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.home-workflow strong {
    font-weight: 800;
}

.home-workflow p {
    color: #6b7280;
    font-size: 0.875rem;
    grid-column: 2;
}

.latest-round-card {
    display: grid;
    gap: 1rem;
}

.latest-round-card > div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.latest-round-card strong {
    color: #030712;
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0.35rem;
}

.home-search {
    max-width: 40rem;
}

.quick-course-panel .panel-heading {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.quick-course-panel h2 {
    white-space: nowrap;
}

.import-shell {
    display: grid;
    gap: 1.5rem;
}

.import-grid {
    display: grid;
    gap: 1.5rem;
}

.import-panel {
    min-height: 100%;
}

.import-form {
    display: grid;
    gap: 1rem;
}

.import-form label,
.import-form fieldset {
    display: grid;
    gap: 0.5rem;
}

.import-form label span,
.import-form legend {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 700;
}

.import-input,
.import-file {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #111827;
    font-size: 1rem;
    min-height: 3rem;
    padding: 0.75rem 0.875rem;
    width: 100%;
}

.import-input:focus,
.import-file:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
    outline: none;
}

.segmented-control {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.25rem;
}

.segmented-control label {
    align-items: center;
    border-radius: 0.375rem;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.5rem;
    touch-action: manipulation;
    user-select: none;
    width: 100%;
}

.segmented-control input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.segmented-control label.active {
    background: #15803d;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.segmented-control label.active span {
    color: inherit;
}

.segmented-control--sm label {
    font-size: 0.78rem;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
}

.session-meta-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.session-meta-controls fieldset {
    border: none;
    display: grid;
    gap: 0.25rem;
    padding: 0;
}

.session-meta-controls legend {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.session-meta-save-row {
    margin-top: 1rem;
}

.session-meta-save-row .import-submit {
    max-width: 14rem;
}

.session-bottom-divider {
    background: var(--line);
    border: none;
    color: transparent;
    height: 1px;
    margin: 2rem 0 1.5rem;
}

.session-delete-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.session-delete-row p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.danger-kicker {
    color: #b91c1c !important;
}

.import-submit {
    -webkit-appearance: none;
    align-items: center;
    background: #15803d;
    border: 0;
    border-radius: 0.5rem;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    justify-content: center;
    line-height: 1.2;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    text-align: center;
    touch-action: manipulation;
    width: 100%;
}

.import-submit:hover {
    background: #166534;
}

.import-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.import-status {
    border-radius: 0.5rem;
    display: grid;
    gap: 0.25rem;
    padding: 0.875rem;
}

.import-status.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.import-status.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.import-status.success strong {
    color: #14532d;
    font-size: 0.875rem;
}

.danger-zone {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.25rem;
}

.danger-zone h2 {
    color: #991b1b;
    font-size: 1.125rem;
    font-weight: 800;
}

.danger-zone p:not(.analytics-kicker) {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.danger-button {
    -webkit-appearance: none;
    align-items: center;
    background: #dc2626;
    border: 0;
    border-radius: 0.5rem;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    text-align: center;
    touch-action: manipulation;
    width: 100%;
}

.danger-button:hover {
    background: #b91c1c;
}

.analytics-panel,
.club-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.analytics-section {
    padding: 0.25rem 0;
}

.panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-heading h2,
.club-card h2 {
    color: #030712;
    font-size: 1.25rem;
    font-weight: 700;
}

.panel-title-link {
    color: #030712;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 800;
}

.panel-title-link:hover {
    color: #15803d;
}

.session-list {
    border-bottom: 1px solid #f3f4f6;
    border-top: 1px solid #f3f4f6;
}

.session-row {
    align-items: center;
    color: #111827;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding: 1rem 0.75rem;
}

.session-row + .session-row {
    border-top: 1px solid #f3f4f6;
}

.session-row:hover {
    background: #f9fafb;
}

.session-row div:first-child {
    min-width: 0;
}

.session-row strong {
    display: block;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-row span {
    color: #6b7280;
    display: block;
    font-size: 0.875rem;
}

.session-badges {
    display: none;
}

.session-badges span,
.status-pill {
    background: #f3f4f6;
    border-radius: 0.375rem;
    color: #4b5563;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

.round-score {
    flex-shrink: 0;
    text-align: right;
}

.round-score strong {
    font-size: 1.5rem;
    line-height: 1;
}

.playing-session-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, auto);
}

.playing-course-cell {
    min-width: 0;
}

.session-stat-cell {
    min-width: 3.2rem;
    text-align: right;
}

.session-stat-cell strong {
    font-size: 1rem;
    line-height: 1.1;
}

@media (max-width: 767px) {
    .playing-session-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .session-stat-cell {
        text-align: left;
    }
}

.latest-round-kpis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
    max-width: 42rem;
}

.latest-round-kpis div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.9rem;
}

.latest-round-kpis strong {
    color: #030712;
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.empty-state {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1.25rem 0;
}

.empty-page-panel {
    min-height: 14rem;
}

.home-chart-grid {
    align-items: stretch;
}

.chart-panel {
    overflow: hidden;
}

.chart-range {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 800;
}

.round-row-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wx-icon {
    background-color: var(--text-muted);
    display: inline-block;
    height: 0.85rem;
    margin-right: 0.15rem;
    mask-repeat: no-repeat;
    mask-size: contain;
    vertical-align: middle;
    width: 0.85rem;
}

.wx-icon.wx-sun {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3' fill='black'/%3E%3Cpath d='M8 1v2M8 13v2M1 8h2M13 8h2M3 3l1.5 1.5M11.5 11.5L13 13M13 3l-1.5 1.5M4.5 11.5L3 13' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.wx-icon.wx-partly-cloudy {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6' cy='5' r='2.5' fill='black'/%3E%3Cpath d='M3 11a3.5 3.5 0 0 1 3-3.46 2.5 2.5 0 1 1 5 .96A2 2 0 1 1 11 12.5H5A3.5 3.5 0 0 1 3 11Z' fill='black'/%3E%3C/svg%3E");
}

.wx-icon.wx-cloud {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 10a4.5 4.5 0 0 1 4-4.5 3.5 3.5 0 1 1 6.5 2.5A2.5 2.5 0 1 1 12 13H5A4.5 4.5 0 0 1 2 10Z' fill='black'/%3E%3C/svg%3E");
}

.wx-icon.wx-rain {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 9a4 4 0 0 1 3.5-4A3 3 0 1 1 12 9H3Z' fill='black'/%3E%3Cpath d='M5 12l-1 3M8 12l-1 3M11 12l-1 3' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.wx-icon.wx-snow {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8a4 4 0 0 1 3.5-4A3 3 0 1 1 12 8H3Z' fill='black'/%3E%3Cpath d='M8 11v4M6 13h4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.wx-icon.wx-thunder {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8a4 4 0 0 1 3.5-4A3 3 0 1 1 12 8H3Z' fill='black'/%3E%3Cpath d='M9 9l-2 3h2l-2 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.round-weather {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.weather-item {
    align-items: center;
    display: inline-flex;
    gap: 0.3rem;
}

.weather-icon {
    flex-shrink: 0;
    height: 1.1rem;
    width: 1.1rem;
}

.weather-desc {
    color: var(--text-muted);
    font-weight: 500;
}

.score-chart {
    display: grid;
    gap: 0.75rem;
}

.score-chart svg {
    display: block;
    height: auto;
    min-height: 13rem;
    overflow: visible;
    width: 100%;
}

.chart-gridline {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.chart-target-line {
    stroke: var(--accent);
    stroke-dasharray: 4 3;
    stroke-opacity: 0.5;
    stroke-width: 1.5;
}

.chart-target-label {
    fill: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.8;
}

.chart-axis-label,
.chart-x-label {
    fill: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
}

.score-line {
    fill: none;
    stroke: #15803d;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.score-dot {
    fill: #15803d;
    stroke: #ffffff;
    stroke-width: 2;
}

.score-dot.partial {
    fill: #ffffff;
    stroke: #15803d;
    stroke-dasharray: 2 2;
    stroke-width: 2.5;
}

.chart-note {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-size: 0.78rem;
    gap: 0.45rem;
}

.score-dot-key {
    border: 2px dashed #15803d;
    border-radius: 999px;
    display: inline-flex;
    height: 0.75rem;
    width: 0.75rem;
}

.carry-bars {
    display: grid;
    gap: 0.9rem;
}

.carry-bar-row {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(5.5rem, 0.8fr) minmax(7rem, 1.4fr) auto;
}

.carry-bar-row > div:first-child {
    min-width: 0;
}

.carry-bar-row strong {
    color: #030712;
    display: block;
    font-weight: 800;
    white-space: nowrap;
}

.carry-bar-row span {
    color: #6b7280;
    display: block;
    font-size: 0.78rem;
}

.carry-bar-track {
    background: #e5e7eb;
    border-radius: 999px;
    height: 0.65rem;
    overflow: hidden;
}

.carry-bar-track span {
    background: linear-gradient(90deg, #15803d, #6d8f35);
    border-radius: inherit;
    height: 100%;
}

@media (max-width: 767px) {
    .home-hero h1 {
        font-size: clamp(2rem, 9vw, 2.7rem);
        white-space: nowrap;
    }

    .carry-bar-row {
        gap: 0.45rem 0.75rem;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .carry-bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .carry-bar-row > strong {
        justify-self: end;
    }

    .quick-course-panel .panel-heading {
        gap: 0.75rem;
    }

    .quick-course-panel h2 {
        font-size: 1.12rem;
    }

    .home-search {
        max-width: none;
    }

    .playing-targets {
        grid-template-columns: 1fr;
    }

    .target-tile {
        align-items: center;
        gap: 0.85rem;
    }
}

.recommendation-grid,
.club-grid {
    display: grid;
    gap: 1rem;
}

.recommendation {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.recommendation span {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.recommendation strong {
    color: #030712;
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.recommendation p {
    color: #4b5563;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.drill-recommendation ul {
    color: #4b5563;
    display: grid;
    font-size: 0.875rem;
    gap: 0.35rem;
    list-style: disc;
    margin-top: 0.75rem;
    padding-left: 1.1rem;
}

.club-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.status-pill.good {
    background: #dcfce7;
    color: #166534;
}

.status-pill.watch {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.bad {
    background: #fee2e2;
    color: #991b1b;
}

.benchmark-bars {
    display: grid;
    gap: 0.75rem;
}

.club-visuals {
    display: grid;
    gap: 0.75rem;
}

.viz-tile {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.5rem;
    min-height: 6.25rem;
    padding: 0.75rem;
}

.viz-heading {
    align-items: baseline;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.viz-heading span {
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 700;
}

.viz-heading strong {
    color: #030712;
    font-size: 1.125rem;
    font-weight: 800;
}

.viz-tile p {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.target-rail,
.angle-scale,
.speedometer {
    background: #e5e7eb;
    border-radius: 999px;
    height: 0.75rem;
    margin-top: 0.75rem;
    overflow: hidden;
    position: relative;
}

.target-zone {
    background: #86efac;
    border-radius: 999px;
    bottom: 0;
    position: absolute;
    top: 0;
}

.target-marker,
.angle-needle {
    background: #111827;
    border-radius: 999px;
    height: 1.35rem;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.2rem;
    z-index: 2;
}

.angle-scale {
    background: linear-gradient(90deg, #bfdbfe 0%, #e5e7eb 50%, #fed7aa 100%);
}

.aoa-scale {
    background: linear-gradient(90deg, #bfdbfe 0%, #dcfce7 45%, #fed7aa 100%);
}

.speedometer {
    background: #dbeafe;
}

.speed-fill {
    background: linear-gradient(90deg, #2563eb, #16a34a);
    border-radius: 999px;
    bottom: 0;
    left: 0;
    position: absolute;
    top: 0;
}

.speed-pair {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.speed-row {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 2.5rem minmax(0, 1fr) 3rem;
}

.speed-row span {
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 700;
}

.speed-row strong {
    color: #111827;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: right;
}

.speed-row .speedometer {
    height: 0.65rem;
    margin-top: 0;
}

.ball-speedometer {
    background: #dbeafe;
}

.club-speedometer {
    background: #dcfce7;
}

.ball-speed-fill {
    background: linear-gradient(90deg, #2563eb, #16a34a);
}

.club-speed-fill {
    background: linear-gradient(90deg, #16a34a, #84cc16);
}

.carry-field {
    background:
        linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px),
        linear-gradient(90deg, #bbf7d0, #86efac);
    background-size: 16px 100%, 100% 100%;
    border-radius: 0.5rem;
    height: 2.3rem;
    margin-top: 0.75rem;
    position: relative;
}

.carry-marker {
    background: #111827;
    border: 2px solid #ffffff;
    border-radius: 999px;
    height: 1rem;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
}

.spin-rail .target-zone {
    background: #93c5fd;
}

.metric-line {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.metric-line div {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.metric-line span {
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-line strong {
    color: #030712;
    font-size: 1.125rem;
    font-weight: 700;
}

.metric-line p {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.club-stats {
    border-top: 1px solid #f3f4f6;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
    padding-top: 1rem;
}

.club-stats div,
.split-grid div {
    background: #f9fafb;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.club-stats dt,
.split-grid span {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.club-stats dd,
.split-grid strong {
    color: #030712;
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

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

.priority-row {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.priority-row strong {
    color: #030712;
}

.priority-row span {
    color: #6b7280;
    float: right;
    font-size: 0.875rem;
    font-weight: 700;
}

.priority-row p {
    clear: both;
    color: #4b5563;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.split-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-grid small {
    color: #6b7280;
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.scorecard-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hole-tile {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 5.5rem;
    padding: 0.5rem 0.6rem;
}

.hole-tile span,
.hole-tile small {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
}

.hole-tile strong {
    color: #030712;
    font-size: 1.5rem;
    font-weight: 700;
}

.hole-tile.great {
    background: #e8f4f9;
    border-color: #9ecede;
}

.hole-tile.good {
    background: #f0fdf4;
    border-color: #86efac;
}

.hole-tile.watch {
    background: #fef6ee;
    border-color: #f5c98a;
}

.hole-tile.bad {
    background: #fef2f2;
    border-color: #fecaca;
}

.hole-tile.worse {
    background: #fde8e8;
    border-color: #e09090;
}

.hole-tile-stats {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.hole-stat {
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 700;
}

.hole-stat.fw-hit {
    color: #3d8052;
}

.hole-stat.gir-hit {
    color: #3d8052;
}

.hole-stat.fw-miss {
    color: #ab4444;
}

.target-tile {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    min-height: 8rem;
    padding: 1rem;
}

.target-tile p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.target-ring {
    align-items: center;
    background:
        radial-gradient(circle at center, #ffffff 0 56%, transparent 57%),
        conic-gradient(#16a34a 0 var(--pct), #e5e7eb var(--pct) 100%);
    border-radius: 999px;
    display: flex;
    flex: 0 0 auto;
    height: 4.75rem;
    justify-content: center;
    position: relative;
    width: 4.75rem;
}

.target-ring::after {
    background: #111827;
    border-radius: 999px;
    content: "";
    height: 0.45rem;
    left: 50%;
    position: absolute;
    top: 0.2rem;
    transform: rotate(var(--target-angle)) translateY(-0.1rem);
    transform-origin: 50% 2.175rem;
    width: 0.45rem;
}

.target-ring strong {
    color: #030712;
    font-size: 1.125rem;
    font-weight: 800;
    position: relative;
}

@media (min-width: 640px) {
    .analytics-hero {
        padding: 2rem;
    }

    .analytics-hero.compact {
        padding-bottom: 1.5rem;
        padding-top: 1.5rem;
    }

    .analytics-hero h1 {
        font-size: 2.25rem;
    }

    .analytics-metrics {
        gap: 1rem;
    }

    .analytics-panel,
    .club-card {
        padding: 1.5rem;
    }

    .session-badges {
        display: flex;
        flex-shrink: 0;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: flex-end;
    }

    .recommendation-grid,
    .club-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .club-visuals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scorecard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .scorecard-grid {
        grid-template-columns: repeat(9, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .analytics-hero {
        align-items: flex-end;
        flex-direction: row;
    }

    .analytics-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-round-kpis {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-width: 48rem;
    }

    .home-actions {
        width: auto;
    }

    .home-action {
        width: auto;
    }

    .import-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .danger-zone {
        align-items: center;
        flex-direction: row;
    }

    .danger-button {
        max-width: 14rem;
    }
}

@media (min-width: 1280px) {
    .club-grid,
    .recommendation-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .golf-button-primary {
        border: 2px solid var(--text);
    }
    
    .golf-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .golf-card {
        border: 1px solid #999999;
        box-shadow: none;
    }
    
    .target-score {
        color: #000000;
    }
}

