/* The 14-day program (v7): the card at the top of Today, its strip of 14 dots, the end screen, the streak question
   (a sheet) and the Settings rows. Scope: the .prg- prefix (the card lives on Today, the question in a sheet). */

.td-program-slot[hidden] { display: none; }
.td-program-slot { margin-bottom: 26px; }

.prg {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 20px 20px 18px; border-radius: var(--r-l);
  background: rgb(var(--fg-rgb) / 0.04); box-shadow: inset 0 0 0 1px var(--line);
}
.prg--done { gap: 10px; }
.prg .label { margin: 0 0 4px; }

/* head: "Day 4 of 14 · Evening · 3 min" and the lesson's title */
.prg-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.prg-kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 13px; color: var(--muted); }
.prg-kicker__day { color: var(--accent); font-weight: 650; letter-spacing: -0.005em; }
.prg-kicker > span + span::before { content: "·"; margin-right: 10px; color: var(--faint); }
.prg-kicker__ok { color: var(--fg); }
.prg-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.prg-why { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg); overflow-wrap: anywhere; }
.prg-task { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.prg-action { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.prg-tip, .prg-wait { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.prg-next { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.prg-next__t { color: var(--fg); font-weight: 550; }

/* what the tracker does for the day: fields, a time pair, a link into the app */
.prg-toolslot:empty { display: none; }
.prg-toolslot { margin-top: 6px; }
.prg-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.prg-tool--row { flex-direction: row; flex-wrap: wrap; }
.prg-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; min-width: 0; width: 100%; }
.prg-row--field { flex-wrap: nowrap; }
.prg-row--field .prg-input { flex: 1; min-width: 0; }
.prg-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.prg-tf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prg-time { width: 100%; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; min-height: 48px; }
.prg-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; counter-reset: prg; }
.prg-fields li { display: flex; align-items: center; gap: 10px; counter-increment: prg; }
.prg-fields li::before { content: counter(prg); flex: none; width: 18px; font-size: 13px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.prg-input { width: 100%; min-width: 0; font-size: 15px; text-overflow: ellipsis; }
.prg-go { gap: 8px; max-width: 100%; }
.prg-go span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prg-go svg { width: 16px; height: 16px; }
.prg-save { gap: 8px; }
.prg-save svg { width: 16px; height: 16px; }
.prg-ok { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.prg-ok svg { flex: none; width: 16px; height: 16px; color: var(--green); }

/* Done (the one main action) and "Small version" */
.prg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.prg-done { min-width: 132px; gap: 8px; }
.prg-done svg { width: 18px; height: 18px; }
.prg-small { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border-radius: var(--r-m); background: rgb(var(--fg-rgb) / 0.05); }
.prg-small__t { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.prg-full { align-self: flex-start; }

/* Read more */
.prg-more { border-top: 1px solid var(--line); padding-top: 4px; }
.prg-more summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; list-style: none; cursor: pointer; font-size: 14px; color: var(--muted); }
.prg-more summary::-webkit-details-marker { display: none; }
.prg-more summary svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.prg-more[open] summary svg { transform: rotate(180deg); }
@media (hover: hover) { .prg-more summary:hover { color: var(--fg); } }
.prg-more__part { padding: 6px 0 10px; }
.prg-more__h { margin: 0 0 4px; font-size: 13px; font-weight: 650; color: var(--fg); }
.prg-more__part p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }

/* the strip: 14 dots, done ones filled, the small version half, today's one breathing */
.prg-strip { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: center; }
.prg-dot { justify-self: center; width: 100%; max-width: 14px; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.prg-dot.is-done { background: var(--accent); box-shadow: none; }
.prg-dot.is-lite { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--accent); }
.prg-dot.is-today { box-shadow: inset 0 0 0 2px var(--accent); animation: prg-breathe 1.8s var(--ease-io) infinite; }
.prg-dot.is-just { outline: 2px solid rgb(var(--accent-rgb) / 0.35); outline-offset: 2px; }
@keyframes prg-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.82); } }
@media (prefers-reduced-motion: reduce) { .prg-dot.is-today { animation: none; } }

/* the end screen: day 1 next to day 14, the rules, Share */
.prg-rings { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0; }
.prg-rings__arrow { color: var(--faint); display: grid; place-items: center; }
.prg-rings__arrow svg { width: 20px; height: 20px; }
.prg-ring { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.prg-ring__stone { display: grid; place-items: center; width: 112px; height: 112px; }
.prg-ring__stone > svg { max-width: 100%; height: auto; }
.prg-ring figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.prg-ring figcaption b { color: var(--fg); font-weight: 650; }
.prg-change { margin: 0; text-align: center; font-size: 15px; font-weight: 550; }
.prg-endrules { padding-top: 12px; border-top: 1px solid var(--line); }
.prg-rules { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.4; }
.prg-rules li { overflow-wrap: anywhere; }
.prg-share { gap: 8px; }
.prg-share svg { width: 18px; height: 18px; }
.prg-again { align-self: flex-start; }

/* the streak question (a sheet) */
.prg-ask { display: flex; flex-direction: column; gap: 12px; }
.prg-ask__t { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.prg-ask .prg-actions .btn { flex: 1 1 140px; }

/* Settings: the upgrade row is a link that looks like the other rows */
a.prg-st-upgrade { color: inherit; text-decoration: none; }

@media (max-width: 380px) {
  .prg { padding: 16px 16px 14px; }
  .prg-strip { gap: 4px; }
  .prg-ring__stone { width: 96px; height: 96px; }
}
