/* =========================================================
   OVERVIEW — the week as the path of the sun
   One bold element (the sky); everything under it stays quiet:
   plain sections on the page background, no card grid.
========================================================= */

.ov {
    --ov-ink: #111e2b;
    --ov-published: #2c4560;
    --ov-scheduled: var(--primary);
    --ov-review: #d99a00;
    --ov-planned: #adc0d2;
    --ov-failed: var(--danger);
    --ov-display: "Plus Jakarta Sans", "Manrope", sans-serif;
}

/* ---------- greeting ---------- */

.ov-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 22px;
}

.ov-title {
    margin: 0;
    font-family: var(--ov-display);
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--ov-ink);
}

.ov-story {
    max-width: 62ch;
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-2);
}

.ov-head-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ---------- the sky ---------- */

.ov-sky {
    position: relative;
    padding: 22px 26px 18px;
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 50% 100%, #cfe3fb 0%, rgba(207, 227, 251, 0) 60%),
        linear-gradient(180deg, #fbfdff 0%, #f1f7ff 100%);
    border: 1px solid var(--border);
}

.ov-sky-top {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.ov-sky-title {
    margin: 0;
    font-family: var(--ov-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
}

.ov-sky-range {
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.ov-week-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.ov-icon-btn,
.ov-today-btn {
    display: inline-grid;
    place-items: center;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-2);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ov-icon-btn { width: 30px; }
.ov-icon-btn svg { width: 15px; height: 15px; }
.ov-today-btn { padding: 0 12px; }
.ov-today-btn:disabled { opacity: 0.45; cursor: default; }
.ov-icon-btn:hover,
.ov-today-btn:hover:not(:disabled) { color: var(--ov-ink); border-color: var(--border-strong); }

.ov-sky-stage {
    position: relative;
    margin: 0 auto;
    max-width: 880px;
}

.ov-arc {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    font-family: var(--ov-display);
}

.ov-arc-future {
    fill: none;
    stroke: var(--border-strong);
    stroke-width: 2;
    stroke-dasharray: 2 9;
    stroke-linecap: round;
}

.ov-arc-past {
    fill: none;
    stroke: url(#ovTravelled);
    stroke-width: 4;
    stroke-linecap: round;
}

.ov-horizon {
    stroke: #cfdff2;
    stroke-width: 1.5;
}

.ov-day-tick {
    stroke: #cadcf1;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.ov-day-name {
    font-size: 16px;
    font-weight: 700;
    fill: var(--text-2);
}

.ov-day-date {
    font-size: 13px;
    font-weight: 600;
    fill: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.ov-day.is-today .ov-day-name { fill: #fff; }
.ov-day.is-today .ov-day-date { fill: rgba(255, 255, 255, 0.85); }
.ov-day-pill { fill: var(--ov-ink); }

.ov-sun-core {
    fill: #4f99ec;
    stroke: #fff;
    stroke-width: 4;
    filter: drop-shadow(0 0 10px rgba(0, 113, 219, 0.55));
}

.ov-sun.is-hidden { display: none; }

/* posts on the arc: marks the sun has passed are solid, ones ahead are softer */
.ov-post {
    cursor: pointer;
    outline: none;
}

.ov-post-body {
    transform: scale(0);
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.ov-post.is-lit .ov-post-body,
.ov-arc.is-settled .ov-post .ov-post-body {
    transform: scale(1);
}

.ov-arc.is-settled .ov-post:not(.is-lit) .ov-post-body {
    transition-delay: 0.1s;
}

.ov-post-dot {
    stroke: #fff;
    stroke-width: 3;
    transition: r 0.15s ease;
}

.ov-post-ring {
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 3 3;
}

/* a bigger invisible target than the mark itself, so small dots are easy to hit */
.ov-hit {
    fill: transparent;
}

/* several posts at once: a white plate, a ring split by status, the count inside */
.ov-group-plate {
    fill: #fff;
    stroke: #d8e7f6;
    stroke-width: 1;
    filter: drop-shadow(0 3px 6px rgba(44, 69, 96, 0.18));
    transition: stroke 0.15s ease;
}

.ov-group-seg {
    fill: none;
    stroke-width: 5;
}

.ov-group-seg.is-published { stroke: var(--ov-published); }
.ov-group-seg.is-scheduled { stroke: var(--ov-scheduled); }
.ov-group-seg.is-review { stroke: var(--ov-review); }
.ov-group-seg.is-planned { stroke: var(--ov-planned); }
.ov-group-seg.is-failed { stroke: var(--ov-failed); }

.ov-group-count {
    font-size: 14px;
    font-weight: 800;
    fill: var(--ov-ink);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.ov-group:hover .ov-group-plate,
.ov-group:focus-visible .ov-group-plate { stroke: var(--primary); stroke-width: 2; }
.ov-group.needs-you .ov-group-plate { stroke: #9cc7f5; }

.ov-post.is-published .ov-post-dot { fill: var(--ov-published); }
.ov-post.is-scheduled .ov-post-dot { fill: var(--ov-scheduled); }
.ov-post.is-review .ov-post-dot { fill: #fff; stroke: var(--ov-review); stroke-width: 4; }
.ov-post.is-planned .ov-post-dot { fill: #fff; stroke: var(--ov-planned); stroke-width: 3; stroke-dasharray: 3 2.5; }
.ov-post.is-failed .ov-post-dot { fill: var(--ov-failed); }
.ov-post.is-partial .ov-post-ring,
.ov-post.is-failed .ov-post-ring { stroke: var(--ov-failed); }
.ov-post .ov-post-ring { stroke: var(--text-3); }

.ov-post:hover .ov-post-dot,
.ov-post:focus-visible .ov-post-dot { r: 12; }
.ov-post:focus-visible .ov-post-ring,
.ov-post:focus-visible .ov-post-body { filter: drop-shadow(0 0 0 var(--primary)) drop-shadow(0 0 4px rgba(0, 113, 219, 0.8)); }

/* tooltip */
.ov-tip {
    position: absolute;
    z-index: 20;
    width: max-content;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--ov-ink);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    transform: translate(-50%, calc(-100% - 14px));
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(17, 30, 43, 0.25);
}

.ov-tip.is-below { transform: translate(-50%, 14px); }
.ov-tip-hint { display: block; margin-top: 6px; color: #8dbcf4; font-size: 11.5px; }

/* the pinned list for a group: interactive, so it's a light panel people can click in */
.ov-tip.is-pinned {
    width: 320px;
    max-width: calc(100% - 16px);
    padding: 6px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    pointer-events: auto;
    box-shadow: 0 18px 44px -12px rgba(44, 69, 96, 0.35);
}

.ov-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 6px 6px 10px;
}

.ov-pop-head strong { margin: 0; font-size: 13px; color: var(--ov-ink); }

.ov-pop-close {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-3);
    cursor: pointer;
}

.ov-pop-close svg { width: 15px; height: 15px; }
.ov-pop-close:hover { background: var(--surface-soft); color: var(--text); }

.ov-pop-list {
    max-height: 260px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.ov-pop-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ov-pop-row .ov-mark { margin-top: 4px; }
.ov-pop-row:hover,
.ov-pop-row:focus-visible { background: var(--surface-soft); outline: none; }
.ov-pop-row:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.ov-pop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-pop-topic { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; }
.ov-pop-meta { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.ov-tip strong { display: block; margin: 2px 0 4px; font-size: 13.5px; font-weight: 700; }
.ov-tip-when { color: #8dbcf4; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-tip-meta { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.75); }
.ov-tip-warn { display: block; margin-top: 4px; color: #ffb4a8; font-weight: 700; }

.ov-sky-empty {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ov-sky-empty p {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
}

/* legend: shape and colour both carry the status */
.ov-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--text-2);
}

.ov-legend li { display: inline-flex; align-items: center; gap: 7px; }

.ov-mark {
    flex-shrink: 0;
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-sizing: border-box;
}

.ov-mark.is-published { background: var(--ov-published); }
.ov-mark.is-scheduled { background: var(--ov-scheduled); }
.ov-mark.is-review { border: 2.5px solid var(--ov-review); background: #fff; }
.ov-mark.is-planned { border: 2px dashed var(--ov-planned); background: #fff; }
.ov-mark.is-failed { background: var(--ov-failed); }

/* ---------- below the sky ---------- */

/* two independent columns, so a tall section on one side leaves no hole on the other */
.ov-lower {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: 40px 56px;
    margin-top: 34px;
}

.ov-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.ov-h2 {
    margin: 0 0 14px;
    font-family: var(--ov-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
}

.ov-sub {
    margin: -8px 0 16px;
    font-size: 13px;
    color: var(--text-3);
}

.ov-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.ov-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    cursor: pointer;
}

.ov-link:hover { text-decoration: underline; }

/* your move */
.ov-lead {
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px -18px rgba(44, 69, 96, 0.35);
}

.ov-lead.is-alert { background: linear-gradient(180deg, #fff 0%, #fff6f5 100%); border-color: #f3cfcb; }
.ov-lead.is-focus { background: linear-gradient(180deg, #fff 0%, #f6fbff 100%); border-color: #f2dfae; }

.ov-lead-title {
    margin: 0;
    font-family: var(--ov-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--ov-ink);
}

.ov-lead-detail {
    max-width: 58ch;
    margin: 8px 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2);
}

.ov-more {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.ov-more li + li { border-top: 1px solid var(--border); }

.ov-more-btn {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 16px;
    width: 100%;
    padding: 13px 4px;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
}

.ov-more-btn:hover .ov-more-go { text-decoration: underline; }
.ov-more-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ov-more-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ov-more-detail { grid-column: 1; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-more-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }

/* how work is moving */
.ov-stations {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ov-station button {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 8px 6px 10px;
    border: 0;
    border-radius: 12px;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ov-station button:hover { background: var(--surface-soft); }
.ov-station button:focus-visible { outline: 2px solid var(--primary); }

.ov-station-count {
    font-family: var(--ov-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ov-ink);
    font-variant-numeric: tabular-nums;
}

.ov-station-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.ov-station-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--fill);
    border-radius: inherit;
    background: var(--ov-planned);
}

.ov-station.is-writing .ov-station-bar span { background: #8ab8ef; }
.ov-station.is-review .ov-station-bar span { background: var(--ov-review); }
.ov-station.is-scheduled .ov-station-bar span { background: var(--ov-scheduled); }
.ov-station.is-published .ov-station-bar span { background: var(--ov-published); }

.ov-station-label { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.3; }

.ov-flow-note {
    margin: 14px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-2);
}

/* going out next */
.ov-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ov-timeline li + li { border-top: 1px solid var(--border); }

.ov-next-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
    width: 100%;
    padding: 12px 4px;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
}

.ov-next-item:hover .ov-next-topic { color: var(--primary-dark); }
.ov-next-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ov-next-when { font-size: 13px; font-weight: 700; color: var(--ov-ink); font-variant-numeric: tabular-nums; }
.ov-next-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ov-next-topic { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-next-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }

.ov-empty-line {
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-2);
}

/* worth writing about */
.ov-signal {
    padding: 14px 0;
}

.ov-signal + .ov-signal { border-top: 1px solid var(--border); }
.ov-signal:first-child { padding-top: 0; }

.ov-signal-kind {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
}

.ov-signal h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.ov-signal p:not(.ov-signal-kind) {
    display: -webkit-box;
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) {
    /* one column: read in priority order — move, flow, next, signals */
    .ov-lower { display: flex; flex-direction: column; gap: 36px; }
    .ov-col { display: contents; }
    .ov-move { order: 1; }
    .ov-flow { order: 2; }
    .ov-next { order: 3; }
    .ov-signals { order: 4; }
}

@media (max-width: 720px) {
    .ov-head { flex-direction: column; align-items: stretch; }
    .ov-head-actions .btn { flex: 1; justify-content: center; }
    .ov-sky { padding: 16px 12px 14px; border-radius: 18px; }
    .ov-week-nav { margin-left: 0; width: 100%; }
    /* the sky scales down about 3x here, so its type and marks scale up to match */
    .ov-day-name { font-size: 34px; }
    .ov-day-date,
    .ov-day-pill { display: none; }
    .ov-day.is-today .ov-day-name { fill: var(--primary-dark); }
    .ov-post-dot { r: 17; stroke-width: 5; }
    .ov-post-ring { r: 24; }
    .ov-group-inner { transform: scale(1.9); }
    .ov-sun-core { r: 26; }
    .ov-legend { justify-content: flex-start; }
    .ov-stations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ov-next-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .ov-lead-title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .ov-post-body { transition: none; }
}
