@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #192a35;
    --muted: #71808a;
    --paper: #f5f7f2;
    --card: #ffffff;
    --mint: #b7e5cf;
    --orange: #ef805f;
    --line: #e3eae4;
}

html {
    font-size: 62.5%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
    font-size: 1.6rem;
    padding: 2.4rem 2rem;
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: .6rem;
    background: var(--orange);
}

.dashboard {
    max-width: 100rem;
    margin: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 2.4rem;
}

.eyebrow {
    color: var(--muted);
    font: 500 1.1rem/1.2 "DM Mono", monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 0 0 .8rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    letter-spacing: -.06em;
    line-height: .95;
    margin-bottom: 0;
}

h1 span {
    color: var(--orange);
}

h2 {
    font-size: 2rem;
    letter-spacing: -.04em;
    margin-bottom: 0;
}

.live-indicator {
    color: var(--muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: .8rem;
}

.live-indicator span {
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: #99b5a5;
}

.is-running .live-indicator span {
    background: var(--orange);
    box-shadow: 0 0 0 .4rem #fce2da;
}

.is-running .live-indicator {
    color: var(--ink);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr .8fr;
    grid-template-rows: auto auto;
    gap: 1.6rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 2.2rem;
    box-shadow: 0 1.4rem 3rem rgba(25, 42, 53, .04);
}

.card--stopwatch {
    grid-row: span 2;
    min-height: 42rem;
    display: flex;
    flex-direction: column;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.session-number,
.profile-mark,
output {
    color: var(--orange);
    font: 500 1.2rem "DM Mono", monospace;
}

.timer {
    margin: auto 0 1.8rem;
    font: 500 clamp(5.8rem, 10vw, 10rem)/.85 "DM Mono", monospace;
    letter-spacing: -.1em;
    white-space: nowrap;
}

.timer-divider {
    color: var(--orange);
    margin: 0 .2em;
}

.timer-status {
    color: var(--muted);
    font-size: 1.3rem;
    margin-bottom: 2.6rem;
}

.timer-actions {
    display: flex;
    gap: .8rem;
    align-items: center;
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
}

.button {
    padding: 1.2rem 1.6rem;
    border-radius: .7rem;
    font-size: 1.3rem;
    font-weight: 700;
    transition: transform .2s, background .2s;
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    color: var(--ink);
    background: var(--mint);
}

.button--secondary {
    color: var(--ink);
    background: #edf2ed;
}

.button--quiet {
    color: var(--muted);
    background: transparent;
    margin-left: auto;
}

.card--profile {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #203943 0%, var(--ink) 65%);
    color: white;
    min-height: 27rem;
    display: flex;
    flex-direction: column;
}

.card--profile::after {
    content: "";
    position: absolute;
    width: 18rem;
    height: 18rem;
    right: -7rem;
    top: -7rem;
    border: 1px solid rgba(183, 229, 207, .2);
    border-radius: 50%;
    box-shadow: 0 0 0 2.4rem rgba(183, 229, 207, .04), 0 0 0 5rem rgba(183, 229, 207, .03);
}

.card--profile .eyebrow {
    color: #a7bbc0;
}

.card--profile h2 {
    max-width: none;
    font-size: 2.3rem;
    white-space: nowrap;
}

.card--profile img {
    position: relative;
    z-index: 1;
    width: 10rem;
    height: 10rem;
    object-fit: cover;
    border-radius: 50%;
    margin: auto 0 1.8rem;
    border: .5rem solid #39505a;
    box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .2);
    transition: transform .25s ease, border-color .25s ease;
}

.card--profile img:hover {
    border-color: var(--mint);
    transform: scale(1.04) rotate(-2deg);
}

.profile-note {
    color: #b7c7c9;
    font-size: 1.3rem;
    margin: 0;
}

.card--slider {
    min-height: 16rem;
}

.card--slider label {
    color: var(--muted);
    display: block;
    font-size: 1.2rem;
    margin: 2rem 0 1.2rem;
}

.card--slider input {
    width: 100%;
    accent-color: var(--orange);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font: 1rem "DM Mono", monospace;
    text-transform: uppercase;
    margin-top: 1rem;
}

footer {
    color: var(--muted);
    font-size: 1.1rem;
    margin-top: 2rem;
}

footer span {
    color: var(--orange);
    margin: 0 .5rem;
}

kbd {
    border: 1px solid #ccd8cf;
    border-radius: .4rem;
    padding: .2rem .5rem;
    font-family: inherit;
}

body[data-scale="1"] .card--profile h2 {
    font-size: 1.8rem;
}

body[data-scale="1"] .timer-status {
    font-size: 1.2rem;
}

body[data-scale="2"] .card--profile h2 {
    font-size: 2.3rem;
}

body[data-scale="2"] .timer-status {
    font-size: 1.3rem;
}

body[data-scale="3"] .card--profile h2 {
    font-size: 2.8rem;
}

body[data-scale="3"] .timer-status {
    font-size: 1.4rem;
}

body[data-scale="4"] .card--profile h2 {
    font-size: 3.3rem;
}

body[data-scale="4"] .timer-status {
    font-size: 1.5rem;
}

@media (max-width: 720px) {
    body {
        padding: 2rem 1.4rem;
    }

    .topbar {
        align-items: start;
        flex-direction: column;
        gap: 1.6rem;
    }

    .dashboard-grid {
        display: flex;
        flex-direction: column;
    }

    .card--stopwatch {
        min-height: 36rem;
    }

    .card {
        padding: 1.8rem;
    }

    .timer {
        margin-top: 5rem;
        font-size: clamp(5.2rem, 19vw, 7.5rem);
    }

    .timer-actions {
        flex-wrap: wrap;
    }

    .card--profile img {
        width: 9rem;
        height: 9rem;
    }

    body[data-scale="1"] .card--profile h2 {
        font-size: 1.7rem;
    }

    body[data-scale="2"] .card--profile h2 {
        font-size: 2rem;
    }

    body[data-scale="3"] .card--profile h2 {
        font-size: 2.3rem;
    }

    body[data-scale="4"] .card--profile h2 {
        font-size: 2.6rem;
    }

    .button--quiet {
        margin-left: 0;
    }
}