/* Daily — plandaily.app/roadmap. Builds on app.css: the same sky, nav, sheet, tiles and night band.
 * Status colours are the arc's area colours: out now = life, next up = workout, upcoming = food,
 * later = the track. */

[data-status="out"]      { --st: var(--life); }
[data-status="next"]     { --st: var(--workout); }
[data-status="upcoming"] { --st: var(--food); }
[data-status="later"]    { --st: color-mix(in srgb, var(--ink) 26%, var(--track)); }

/* ---------- Hero ---------- */
.rm-hero {
  max-width: 1180px; margin: 0 auto; min-height: 92svh;
  padding: 120px max(20px, env(safe-area-inset-right)) 80px max(20px, env(safe-area-inset-left));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 48px;
}
.rm-hero .hero-title { font-size: clamp(44px, 6.4vw, 84px); }

.rm-year { margin: 0; padding: 24px 26px 20px; gap: 6px; }
.year-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.year-range { font-size: 13.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.year-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.year-track { fill: none; stroke: var(--track); stroke-width: 64; transition: stroke .8s; }
.year-seg {
  fill: none; stroke: var(--st); stroke-width: 64;
  transition: stroke-width .3s var(--ease), opacity .3s ease, stroke .8s;
}
.year-cap { fill: var(--st); transition: opacity .3s ease; }
.year-link { cursor: pointer; outline: none; }
.year-link:hover .year-seg, .year-link:focus-visible .year-seg, .year-link.hot .year-seg { stroke-width: 80; }
.year-link:focus-visible .year-seg { stroke: color-mix(in srgb, var(--st) 80%, var(--ink)); }
.year-seg.dim, .year-cap.dim { opacity: .22; }
.year-big { font-family: var(--serif); font-weight: 700; font-size: 150px; fill: var(--ink); text-anchor: middle; letter-spacing: -.03em; }
.year-small { font-size: 34px; fill: var(--ink-3); text-anchor: middle; }
.year-end { font-size: 24px; font-weight: 600; fill: var(--ink-3); text-anchor: middle; }
.year-mark { font-size: 22px; font-weight: 700; fill: var(--ink-3); text-anchor: middle; letter-spacing: .02em; }
.year-tick { stroke: var(--ink-3); stroke-width: 3; stroke-linecap: round; opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .year-sun .sun-halo { animation: halo 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes halo { 50% { transform: scale(1.25); opacity: .16; } }
}

.year-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.year-legend .dot { background: var(--st); }
.year-now { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hairline); text-align: center; font-size: 15px; color: var(--ink-2); }
.year-now a { text-decoration: none; }
.year-now a:hover b { text-decoration: underline; text-decoration-color: var(--workout); text-underline-offset: 3px; }
.year-now b { color: var(--ink); }

/* ---------- Timeline ---------- */
.rm-timeline { max-width: 1000px; margin: 0 auto; padding: 110px 24px 40px; }

.rm-filter {
  position: sticky; top: max(78px, calc(env(safe-area-inset-top) + 68px)); z-index: 5;
  margin: 40px auto 0; display: flex; gap: 4px; width: max-content; max-width: 100%;
  padding: 6px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 12px 30px -18px rgb(0 0 0 / .4);
  overflow-x: auto; scrollbar-width: none;
}
.rm-filter::-webkit-scrollbar { display: none; }
.rm-filter button {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font: 600 14.5px/1 var(--font); color: var(--ink-2); background: none; border: 0; cursor: pointer;
  padding: 10px 14px; border-radius: 999px; transition: background .25s, color .25s;
}
.rm-filter button:hover { color: var(--ink); }
.rm-filter .count { font-size: 12px; font-weight: 700; min-width: 20px; padding: 3px 6px; border-radius: 999px; background: var(--track); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rm-filter button[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 6px 16px -8px rgb(228 87 27 / .8); }
.rm-filter button[aria-pressed="true"] .count { background: rgb(255 255 255 / .24); color: #fff; }

.rm-track { position: relative; margin-top: 44px; --rail: 92px; --p: 0; }
.rm-spine { position: absolute; top: 34px; bottom: 34px; left: calc(var(--rail) + 18px + 13px); width: 3px; translate: -1px 0; border-radius: 3px; background: var(--track); transition: background .8s; }
.rm-spine-fill {
  position: absolute; inset: 0 0 auto; height: calc(var(--p) * 100%); border-radius: inherit;
  background: linear-gradient(180deg, var(--life), var(--workout) 45%, var(--food));
}
.rm-spine-sun {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); width: 18px; height: 18px; translate: -50% -50%;
  border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 6px rgb(246 178 26 / .28), 0 0 26px rgb(246 178 26 / .65);
}

.rm-list { list-style: none; margin: 0; padding: 0; }
.rel {
  position: relative; display: grid; grid-template-columns: var(--rail) 26px minmax(0, 1fr); column-gap: 18px;
  padding: 12px 0; scroll-margin-top: 150px;
}
.rel[hidden] { display: none; }
.rel-when { text-align: right; padding-top: 25px; font-variant-numeric: tabular-nums; }
.rel-month { display: block; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.rel-year { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.rel[data-status="next"] .rel-month { color: color-mix(in srgb, var(--workout) 85%, var(--ink)); }
.rel-dot {
  position: relative; z-index: 1; justify-self: center; margin-top: 30px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--st); transition: background .8s;
}
.rel[data-status="out"] .rel-dot { background: var(--st); }
.rel[data-status="next"] .rel-dot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--st); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .rel[data-status="next"] .rel-dot::after { animation: ping 2.4s var(--ease) infinite; }
  @keyframes ping { 0% { opacity: .7; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.3); } }
}

.rel-card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 24px 26px 24px; box-shadow: var(--shadow);
  transition: transform .4s var(--ease), border-color .3s ease, background .8s ease;
}
.rel-card::before { /* a band of the status colour, like a piece of the arc */
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--st);
}
.rel-card:hover, .rel.hot .rel-card { transform: translateY(-2px); border-color: color-mix(in srgb, var(--st) 50%, transparent); }
.rel.flash .rel-card { animation: flash 1.4s ease; }
@keyframes flash { 20% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 45%, transparent), var(--shadow); } }

.rel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.rel-ver {
  font: 700 13px/1 var(--mono); letter-spacing: -.01em; padding: 6px 9px; border-radius: 9px;
  color: var(--ink); background: color-mix(in srgb, var(--st) 16%, transparent);
}
.rel-status { font-size: 11.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: color-mix(in srgb, var(--st) 72%, var(--ink)); }
.rel[data-status="later"] .rel-status { color: var(--ink-3); }
.rel h3 { margin-top: 12px; font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.rel-sum { margin-top: 6px; font-size: 16.5px; color: var(--ink-2); text-wrap: pretty; }
.rel-items { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--hairline); display: grid; gap: 11px; }
.rel-items li { position: relative; padding-left: 32px; font-size: 15.5px; line-height: 1.45; text-wrap: pretty; }
.rel-items li::before { /* Daily's to-do circle; ticked once it ships */
  content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--st) 75%, var(--track)); box-sizing: border-box;
}
.rel[data-status="out"] .rel-items li::before {
  border: 0;
  background: var(--st) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.tag {
  display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; white-space: nowrap;
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em; color: var(--ink-2); background: var(--track); transition: background .8s;
}
.tag.tip { color: color-mix(in srgb, var(--food) 80%, var(--ink)); background: color-mix(in srgb, var(--food) 14%, transparent); }
.tag.big { margin-left: 0; }
.rel-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- Maybe ---------- */
.rm-maybe { padding-top: 90px; padding-bottom: 110px; }
.rm-maybe .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-idea { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.tile a { color: var(--ink); font-weight: 650; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.bento .tile:nth-child(4) { transition-delay: .24s; }

/* ---------- End ---------- */
.rm-end { max-width: 1040px; margin: 0 auto; padding: 110px max(16px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.rm-end h2 { margin-top: 0; }
.rm-end .hero-actions { justify-content: center; text-shadow: none; }
.foot-links a[aria-current="page"] { opacity: 1; font-weight: 650; }

/* ---------- Smaller screens ---------- */
@media (max-width: 960px) {
  .rm-hero { grid-template-columns: 1fr; text-align: center; padding-top: 104px; gap: 36px; min-height: 0; }
  .rm-hero .hero-lede { margin-left: auto; margin-right: auto; }
  .rm-hero .hero-actions { justify-content: center; }
  .rm-year { max-width: 600px; width: 100%; margin: 0 auto; text-align: left; }
  .rm-maybe .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-timeline { padding-top: 80px; }
}
@media (max-width: 640px) {
  .rm-hero .hero-title { font-size: clamp(40px, 12vw, 58px); }
  .rm-year { padding: 18px 16px 16px; border-radius: 24px; }
  .year-legend { font-size: 13px; gap: 4px 12px; }
  .rm-timeline { padding: 70px 16px 20px; }
  .rm-filter { width: auto; margin-left: -4px; margin-right: -4px; }
  .rm-filter { gap: 0; padding: 5px; }
  .rm-filter button { padding: 10px 8px; font-size: 13.5px; }
  .rm-filter .count { display: none; }
  .rm-track { --rail: 0px; }
  .rm-spine { left: 13px; }
  .rel { grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; }
  .rel-when { grid-column: 2; grid-row: 1; text-align: left; padding: 6px 0 8px 2px; display: flex; gap: 6px; align-items: baseline; }
  .rel-when .rel-month { font-size: 15px; }
  .rel-dot { grid-column: 1; grid-row: 1; margin-top: 8px; }
  .rel-card { grid-column: 2; grid-row: 2; padding: 20px 18px; border-radius: 24px; }
  .rm-maybe { padding: 60px 16px 80px; }
  .rm-maybe .bento { grid-template-columns: 1fr; }
}
