/* Time Wasted — page-local styles (clock, age trap, life summary) */

.time-wasted-page .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tw-clock-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.tw-clock-face {
    position: relative;
    width: min(280px, 85vw);
    aspect-ratio: 1;
    border: 3px solid var(--fg);
    border-radius: 50%;
    background: #fafafa;
    box-shadow: 6px 6px 0 var(--fg);
}

.tw-clock-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 3px solid var(--fg);
    border-radius: 50%;
    background: #ffffff;
    z-index: 4;
}

.tw-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 6px;
    margin-left: -3px;
    transform-origin: 50% 100%;
    border-radius: 3px 3px 0 0;
    background: var(--fg);
    z-index: 1;
}

.tw-hand--hour {
    height: 28%;
    width: 8px;
    margin-left: -4px;
    z-index: 1;
}

.tw-hand--minute {
    height: 38%;
    background: #2a2a2d;
    z-index: 2;
}

.tw-hand--second {
    height: 42%;
    width: 3px;
    margin-left: -1.5px;
    background: #c42b2b;
    z-index: 3;
}

.tw-hand--second::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 3px;
    height: 18%;
    margin-left: -1.5px;
    background: #c42b2b;
    border-radius: 0 0 2px 2px;
}

.tw-thematic-block,
.tw-exercise-section,
.tw-elevation-block {
    margin: 0;
    padding: 1.15rem 1.35rem 1.25rem;
    border: 3px solid var(--fg);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 5px 5px 0 var(--fg);
}

.tw-thematic-block p,
.tw-exercise-section p,
.tw-elevation-block p {
    margin: 0 0 0.85rem;
    line-height: 1.45;
    font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.tw-thematic-block p:last-child,
.tw-exercise-section p:last-child,
.tw-elevation-block p:last-child {
    margin-bottom: 0;
}

.tw-exercise-section h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    text-transform: lowercase;
}

.tw-age-trap-section {
    margin: 0;
    padding: 0;
    text-align: center;
}

.tw-age-trap-prompt {
    margin: 0 0 1rem;
    font-size: clamp(0.98rem, 2vw, 1.12rem);
    line-height: 1.45;
    font-weight: 700;
}

.tw-age-fields {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
}

.tw-age-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 5rem;
}

.tw-age-field-wrap:has(.tw-age-field--hidden:not(.tw-age-field--revealed)) {
    display: none;
}

.tw-age-field-wrap label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tw-age-field {
    padding: 0.5rem 0.65rem;
    border: 3px solid var(--fg);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    background: #fff;
    box-shadow: 3px 3px 0 var(--fg);
}

.tw-age-field:focus {
    outline: 2px dashed var(--fg);
    outline-offset: 2px;
}

.tw-age-trap-reveal {
    margin: 1rem 0 0;
    min-height: 0;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 800;
    line-height: 1.35;
    color: #a32121;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.12);
    transition:
        opacity 0.45s ease,
        visibility 0.45s ease,
        max-height 0.5s ease;
}

.tw-age-trap-reveal.tw-age-trap-reveal--visible {
    opacity: 1;
    visibility: visible;
    max-height: 8rem;
    animation: tw-trap-pop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tw-trap-pop {
    0% {
        transform: scale(0.94);
        filter: blur(2px);
    }
    55% {
        transform: scale(1.02);
        filter: blur(0);
    }
    100% {
        transform: scale(1);
    }
}

.tw-life-summary {
    margin-top: 0.5rem;
    padding: 1.25rem 1.35rem 1.35rem;
    border: 3px solid var(--fg);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f3f3f5 100%);
    box-shadow: 5px 5px 0 var(--fg);
    text-align: center;
}

.tw-life-summary h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    text-transform: lowercase;
}

.tw-life-summary p {
    margin: 0;
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.5;
}

.tw-life-percent {
    display: block;
    margin-top: 0.5rem;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
