html:has(.growth-log-layout) {
    scroll-behavior: smooth;
}

.growth-log-container {
    --log-ink: var(--ink, #16243d);
    --log-muted: #53627a;
    --log-line: var(--border, #e1e7f0);
    --log-accent: var(--blue, #2563eb);
    --log-paper: var(--paper, #f6f8fc);
    --growth-log-top: 96px;
    --growth-log-scroll-margin: 112px;
    max-width: 1060px;
}

.growth-log-hero {
    margin: 0;
    padding: 8px 0 40px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.growth-log-hero h1 {
    margin: 0 0 14px;
    color: var(--log-ink);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.3;
}

.growth-log-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--log-muted);
    font-size: 16px;
    line-height: 1.9;
}

.growth-log-layout {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    align-items: start;
    gap: 48px;
}

.growth-log-month-nav {
    position: sticky;
    top: var(--growth-log-top);
    max-height: calc(100dvh - var(--growth-log-top) - 24px);
    overflow-y: auto;
    padding: 4px;
}

.growth-log-nav-label {
    margin: 0 0 16px;
    color: var(--log-muted);
    font-size: 13px;
}

.growth-log-month-links {
    list-style: none;
    margin: 0 0 0 4px;
    padding: 0;
    border-left: 1px solid var(--log-line);
}

.growth-log-month-links li + li {
    margin-top: 4px;
}

.growth-log-month-links a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px 10px 20px;
    border-radius: 0 8px 8px 0;
    color: var(--log-muted);
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 150ms, color 150ms;
}

.growth-log-month-links a::before {
    content: "";
    position: absolute;
    left: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9baac0;
}

.growth-log-month-links a:hover {
    color: var(--log-accent);
    background: #edf3ff;
}

.growth-log-month-links a[aria-current="location"] {
    color: var(--log-accent);
    background: #edf3ff;
    font-weight: 700;
}

.growth-log-month-links a[aria-current="location"]::before {
    background: var(--log-accent);
    box-shadow: 0 0 0 4px var(--log-paper);
}

.growth-log-month-links a:focus-visible {
    outline: 2px solid var(--log-accent);
    outline-offset: 2px;
}

.growth-log-timeline {
    display: grid;
    min-width: 0;
    gap: 48px;
}

.growth-log-month {
    min-width: 0;
    scroll-margin-top: var(--growth-log-scroll-margin);
}

.growth-log-month:focus-visible {
    outline: 2px solid var(--log-accent);
    outline-offset: 6px;
}

.growth-log-month-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--log-line);
}

.growth-log-month-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.4;
    color: var(--log-ink);
}

.growth-log-month-heading > span {
    color: var(--log-muted);
    font-size: 13px;
}

.growth-log-day {
    padding: 24px;
    border: 1px solid var(--log-line);
    border-radius: 14px;
    background: white;
    box-shadow: none;
}

.growth-log-day + .growth-log-day {
    margin-top: 16px;
}

.growth-log-date {
    display: block;
    margin: 0 0 16px;
    color: var(--log-muted);
    font-size: 13px;
    line-height: 1.6;
}

.growth-log-entry {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    overflow-wrap: anywhere;
}

.growth-log-entry + .growth-log-entry {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--log-line);
}

.growth-log-entry h3 {
    margin: 0;
    color: var(--log-ink);
    font-size: 19px;
    line-height: 1.6;
}

.growth-log-type-pill {
    display: inline-flex;
    width: fit-content;
    padding: 4px 9px;
    border: 0;
    border-radius: 6px;
    background: #edf3ff;
    color: #2453a6;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.growth-log-entry-idea .growth-log-type-pill { background: #fff7e6; color: #8a5a00; }
.growth-log-entry-observation .growth-log-type-pill { background: #ecfdf3; color: #067647; }
.growth-log-entry-experiment .growth-log-type-pill { background: #f2f4f7; color: #344054; }

.growth-log-body {
    color: var(--log-muted);
    font-size: 15px;
    line-height: 1.9;
}

.growth-log-body p { margin: 0; }
.growth-log-body p + p { margin-top: 10px; }

@media (max-width: 700px) {
    .growth-log-container { --growth-log-scroll-margin: 176px; }
    .growth-log-hero { padding: 0 0 28px; }
    .growth-log-layout { display: block; }
    .growth-log-month-nav {
        z-index: 10;
        margin-bottom: 28px;
        padding: 8px 0;
        max-height: none;
        overflow: visible;
        background: var(--log-paper);
        border-bottom: 1px solid var(--log-line);
    }
    .growth-log-nav-label { display: none; }
    .growth-log-month-links {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 0;
        padding: 4px;
        border: 0;
        scrollbar-width: thin;
    }
    .growth-log-month-links li { flex-shrink: 0; }
    .growth-log-month-links li + li { margin: 0; }
    .growth-log-month-links a { border-radius: 8px; padding: 10px 12px; }
    .growth-log-month-links a::before { display: none; }
    .growth-log-month-links a[aria-current="location"] { box-shadow: inset 0 -2px var(--log-accent); }
    .growth-log-month-heading h2 { font-size: 21px; }
    .growth-log-day { padding: 20px; }
    .growth-log-entry h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html:has(.growth-log-layout) { scroll-behavior: auto; }
    .growth-log-month-links a { transition: none; }
}
