/* The side column of Home (views/rail.js draws it). The card itself, its place in the frame and its scroll are in
   family.css; this file is what sits inside: the day, what was left open, the picks, the patient page. */
#rightRail > div { padding: 4px 18px 18px; }
:where(#rightRail) :where(h2, p) { margin: 0; }

/* the day: the date, what is left to read, and a ring that fills as the day's posts are read */
.rl-day { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rl-day__txt { min-width: 0; }
.rl-day__txt > span { display: block; font-size: 12.5px; color: var(--color-muted-foreground); }
.rl-day__txt > b { display: block; margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -.018em; line-height: 1.15; text-wrap: balance; }
.rl-day__txt > small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--color-muted-foreground); }

/* a piece's head */
.rl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rl-h h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.rl-link { border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--color-brand-ink); }
.rl-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.rl-x { display: grid; width: 28px; height: 28px; margin-right: -6px; place-items: center; border-radius: 50%; color: var(--color-muted-foreground); transition: background-color .15s var(--ease-out), color .15s var(--ease-out); }
.rl-x:hover { background: var(--color-muted); color: var(--color-foreground); }
.rl-why { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease-out); }
.rl-why.is-open { grid-template-rows: 1fr; }
.rl-why > div { min-height: 0; overflow: hidden; }
.rl-why p { padding: 0 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--color-muted-foreground); }

/* what was left open */
.rl-open { display: flex; flex-direction: column; gap: 2px; }
.rl-open__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 12px; margin: 0 -8px; padding: 8px; border-radius: 16px; text-align: left; transition: background-color .16s var(--ease-out); }
.rl-open__row:hover { background: var(--color-muted); }
.rl-open__ic { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--color-muted); color: var(--oryn-text-2); }
.rl-open__ic.is-live { background: var(--brand-soft); color: var(--color-brand); }
.rl-open__txt { min-width: 0; }
.rl-open__txt b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; font-weight: 600; line-height: 1.3; }
.rl-open__txt small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--color-muted-foreground); }
.rl-open__txt small.is-live { font-weight: 600; color: var(--color-brand-ink); }
.rl-open__go { color: var(--color-muted-foreground); opacity: 0; translate: -4px 0; transition: opacity .16s var(--ease-out), translate .3s var(--ease-out); }
.rl-open__row:hover .rl-open__go, .rl-open__row:focus-visible .rl-open__go { opacity: 1; translate: 0 0; }

/* picked for you: the first with its cover wide, the others as rows */
.rl-picks { display: flex; flex-direction: column; gap: 2px; }
.rl-pick { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 -8px; padding: 8px; border-radius: 18px; transition: background-color .16s var(--ease-out); }
.rl-pick:hover { background: var(--color-muted); }
.rl-pick .dx-cover, .rl-pick .dx-thumb.dx-cover { width: 68px; aspect-ratio: 1; border-radius: 14px; }
.rl-pick .dx-cover__word { display: none; }
.rl-pick .dx-cover img { transition: scale .5s var(--ease-out); }
.rl-pick:hover .dx-cover img { scale: 1.04; }
.rl-pick__txt { display: block; min-width: 0; }
.rl-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rl-tag--brand { background: var(--brand-soft); color: var(--color-brand-ink); }
/* the warm tag's words ("Most discussed", "Most liked") measured 4.2 to 1 on their tint in the light theme: with a
   little more of the text colour in the mix they read at 5 to 1 there and above 7 in the dark theme, the same hue */
.rl-tag--warm { background: color-mix(in srgb, var(--color-brand-2) 14%, transparent); color: color-mix(in srgb, var(--color-brand-2) 62%, var(--color-foreground)); }
.rl-tag--alert { background: color-mix(in srgb, var(--color-alert) 12%, transparent); color: var(--color-alert-ink); }
.rl-tag--quiet { background: color-mix(in srgb, var(--color-foreground) 7%, transparent); color: var(--oryn-text-2); }
.rl-pick b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.rl-pick small { display: flex; gap: 10px; margin-top: 4px; overflow: hidden; font-size: 12px; color: var(--color-muted-foreground); white-space: nowrap; }
.rl-pick small span:first-child { overflow: hidden; text-overflow: ellipsis; }
.rl-pick small span + span { flex: none; }

/* the patient page: a pass the doctor hands out */
#rightRail #ppRail { border-top: 0; padding-top: 6px; }
.rl-pass { padding: 16px; border: 1px solid var(--frost-line); border-radius: 22px; background: radial-gradient(240px 150px at 100% 0%, var(--field-a), transparent 70%), var(--frost-strong); box-shadow: var(--frost-rim); }
.rl-pass__top { display: flex; align-items: flex-start; gap: 12px; }
.rl-pass__mark { display: grid; flex: none; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--brand-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.rl-pass h2 { font-size: 14.5px; font-weight: 600; }
.rl-pass p { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--color-muted-foreground); }
.rl-pass__link { display: flex; align-items: center; gap: 6px; height: 40px; margin-top: 14px; padding: 0 5px 0 14px; border-radius: 999px; background: var(--frost-well); }
.rl-pass__link code { flex: 1; min-width: 0; overflow: hidden; font: 500 12.5px/1 var(--font-sans); color: var(--oryn-text-2); text-overflow: ellipsis; white-space: nowrap; }
.rl-pass__link button { display: grid; flex: none; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--color-muted-foreground); transition: background-color .15s var(--ease-out), color .15s var(--ease-out); }
.rl-pass__link button:hover { background: var(--color-card); color: var(--color-brand-ink); }
.rl-pass__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.rl-pass__acts button { height: 38px; border-radius: 999px; font-size: 13.5px; font-weight: 600; transition: background-color .16s var(--ease-out), box-shadow .3s var(--ease-out); }
.rl-pass__acts button:first-child { background: var(--color-brand); color: var(--color-primary-foreground); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 8px 18px -10px var(--color-brand); }
.rl-pass__acts button:first-child:hover { background: var(--color-brand-hover); }
.rl-pass__acts button + button { border: 1px solid var(--frost-line); background: var(--color-card); box-shadow: var(--frost-rim); }
.rl-pass__acts button + button:hover { border-color: var(--oryn-border-hover); }
.rl-pass > small { display: block; margin-top: 10px; font-size: 12px; color: var(--color-muted-foreground); }
@media (prefers-reduced-motion: reduce) { .rl-why, .rl-open__go, .rl-pick .dx-cover img { transition: none; } }

/* ── the reading pass (27 October 2026): a quiet column beside the feed ──
   No frame around its blocks (a rule between them is enough), the day as one line, a pick as a small row whose label is words. */
#rightRail > div > section { padding: 0 6px; border: 0 !important; background: transparent; box-shadow: none !important; }
#rightRail > div > section + section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--frost-line) !important; }
#rightRail > div > footer { padding-top: 22px; }
.rl-day__txt > b { margin-top: 3px; font-size: 16px; }
.rl-pick { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
.rl-pick .dx-cover, .rl-pick .dx-thumb.dx-cover { width: 52px; border-radius: 10px; }
.rl-tag { height: auto; padding: 0; background: none !important; font-size: 11.5px; font-weight: 600; color: var(--color-muted-foreground); }
.rl-tag--alert { color: var(--color-alert-ink); }
.rl-pick b { margin-top: 3px; font-size: 13.5px; }
