/*
 * The Today pages (/today/, /today/sky/, /today/calendar/, /today/holy/),
 * shaped like the app's Today tab on the shared Sanctuary page styles.
 */
.td-page { --td-gold: #e2c36d; --td-surface: rgba(20, 34, 25, 0.82); --td-raised: #1c2e22; --td-parchment: #e6dcc2; --td-hair: rgba(244, 236, 216, 0.12); --td-goldline: rgba(226, 195, 109, 0.28); }
.td-page *, .td-page *::before, .td-page *::after { box-sizing: border-box; }
.td-page { overflow-wrap: anywhere; }
.td-gold { color: var(--td-gold); }
.td-center { text-align: center; }
.td-italic { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500; }

/* Buttons and links that read as plain text */
.td-plain {
  background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: inherit; cursor: pointer;
}
.td-page a, .td-page button { -webkit-tap-highlight-color: transparent; }
.td-page a:focus-visible, .td-page button:focus-visible, .td-page input:focus-visible, .td-page select:focus-visible, .td-page textarea:focus-visible, .td-page summary:focus-visible {
  outline: 2px solid var(--td-gold); outline-offset: 3px; border-radius: 8px;
}
.td-link { color: var(--td-gold); text-decoration: underline; text-underline-offset: 3px; }

/* Header: the date, the day's ruler, the tradition's line, the other calendars */
.td-header { display: grid; gap: 4px; justify-items: center; text-align: center; margin-top: 8px; }
.td-date { letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.td-ruler { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500; font-size: 1.12rem; color: var(--td-gold); }
.td-lead { min-height: 44px; display: grid; gap: 4px; justify-items: center; width: 100%; }
.td-lead__text { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.7rem; line-height: 1.15; color: var(--cream); }
.td-lines { display: grid; gap: 2px; width: 100%; }
.td-line { min-height: 32px; padding: 4px 0; width: 100%; text-align: center; }
.td-line__chev { color: var(--muted); }
.td-line-details { display: grid; gap: 6px; padding: 4px 8px 8px; justify-items: center; text-align: center; }
.td-chip-row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.td-conf { display: inline-block; border: 1px solid var(--muted); border-radius: 999px; padding: 1px 9px; font-size: 0.72rem; letter-spacing: 0.03em; color: var(--td-parchment); font-weight: 600; }
.td-conf--historical { border-color: var(--td-gold); }
.td-conf--reconstructed { border-color: #6f8465; }

/* The moon and holiday panels */
.td-panels { display: grid; gap: 18px; }
.td-panels--side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.td-moon { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: inherit; border-radius: 18px; padding: 4px; }
.td-moon:hover .td-moon__phase { color: var(--td-gold); }
.td-moon__phase { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 2.1rem; line-height: 1.1; margin: 4px 0 0; text-align: center; color: var(--cream); }
.td-moon__sign { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500; font-size: 1.2rem; line-height: 1.3; color: var(--td-gold); text-align: center; }
.td-moon--compact .td-moon__phase { font-size: 1.5rem; }
.td-moon--compact .td-moon__sign { font-size: 0.95rem; }
.td-holiday { background: var(--td-surface); border: 1px solid rgba(226, 195, 109, 0.5); border-radius: 20px; padding: 16px; display: grid; gap: 14px; }
.td-holiday--compact { padding: 12px; gap: 10px; }
.td-holiday__item { display: grid; gap: 4px; color: inherit; text-decoration: none; border-radius: 10px; }
.td-holiday__item:hover .td-holiday__name { color: var(--td-gold); }
.td-holiday__name { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.75rem; line-height: 1.15; margin: 0; color: var(--cream); }
.td-holiday--compact .td-holiday__name { font-size: 1.2rem; }
.td-holiday__meaning { color: var(--td-parchment); line-height: 1.55; }
.td-holiday--compact .td-holiday__meaning, .td-holiday--compact .sp-caption { font-size: 0.82rem; line-height: 1.4; }

/* Cards */
.td-card { background: var(--td-surface); border: 1px solid var(--td-hair); border-radius: 20px; padding: 16px; display: grid; gap: 8px; }
.td-card--working { border-color: rgba(226, 195, 109, 0.24); gap: 14px; }
.td-card__title { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.45rem; line-height: 1.2; margin: 0; color: var(--cream); }
.td-steps { margin: 0.25rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.td-card .button { justify-self: start; }
.td-working-text { display: grid; gap: 3px; }
.td-good-for { color: var(--td-parchment); line-height: 1.6; }

/* For your practice */
.td-practice-row { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--td-goldline); color: inherit; text-decoration: none; min-height: 44px; }
.td-practice-row:hover .td-practice-row__line { color: var(--td-gold); }
.td-practice-row__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.td-practice-label { font-weight: 600; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--td-gold); }
.td-practice-row .td-chev { color: var(--td-gold); flex: none; }
a.td-card--link { color: inherit; text-decoration: none; }
a.td-card--link:hover { border-color: rgba(226, 195, 109, 0.5); }

/* On the horizon */
.td-horizon { display: grid; gap: 10px; }
.td-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.td-tile { display: flex; align-items: center; gap: 10px; background: var(--td-surface); border-radius: 16px; padding: 14px; color: inherit; text-decoration: none; min-height: 44px; }
.td-tile:hover { background: var(--td-raised); }
.td-tile > svg { flex: none; color: var(--td-gold); }
.td-tile__text { display: grid; gap: 2px; min-width: 0; }
.td-tile__title { font-weight: 600; font-size: 0.98rem; color: var(--cream); }

/* Correspondences */
.td-corr { display: grid; gap: 4px; }
.td-corr__label { font-weight: 600; font-size: 0.85rem; color: var(--td-gold); }
.td-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.td-tag { border: 1px solid var(--td-goldline); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; color: var(--cream); background: var(--td-raised); text-decoration: none; }
a.td-tag { border-color: rgba(226, 195, 109, 0.55); }
a.td-tag:hover { background: rgba(226, 195, 109, 0.16); }

/* Reflect and Last time */
.td-prompt { border-left: 2px solid var(--td-goldline); padding-left: 14px; display: grid; gap: 4px; }
.td-prompt__text { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500; font-size: 1.35rem; line-height: 1.3; color: var(--cream); }
.td-last { display: flex; justify-content: center; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; text-align: center; }
.td-last:hover { color: var(--cream); }

/* Sky page */
.td-planets { display: grid; gap: 10px; }
.td-planet { background: var(--td-surface); border-radius: 16px; padding: 14px; display: grid; gap: 4px; }
.td-planet__head { display: flex; align-items: baseline; gap: 10px; }
.td-planet__name { flex: 1; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.3rem; margin: 0; color: var(--cream); }
.td-planet__pos { font-weight: 600; color: var(--td-gold); }
.td-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.td-hour { display: flex; gap: 12px; padding: 6px 10px; border-radius: 8px; }
.td-hour--now { background: var(--td-raised); color: var(--td-gold); }
.td-hour__time { width: 110px; flex: none; color: var(--td-parchment); }
.td-hour--now .td-hour__time { color: var(--td-gold); }
.td-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Calendar & holidays */
.td-check-row { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--cream); font: inherit; text-align: left; cursor: pointer; }
.td-check-row:last-child { border-bottom: 0; }
.td-check-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: #e2c36d; flex: none; margin: 0; }
.td-check-row__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.td-cal { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.td-cal:last-child { border-bottom: 0; }
.td-cal__head { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.td-cal__name { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.3rem; line-height: 1.2; color: var(--cream); }
.td-cal__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-choice { display: grid; gap: 6px; padding-top: 4px; }
.td-choice__label { font-weight: 600; font-size: 0.85rem; color: var(--td-parchment); }
.td-small-button { min-height: 32px; padding: 4px 12px; border-radius: 16px; border: 1px solid var(--td-goldline); background: transparent; color: var(--td-gold); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; flex: none; }
.td-small-button:hover { background: rgba(226, 195, 109, 0.12); }
.td-year { display: grid; gap: 14px; }
.td-year__row { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--td-hair); }
.td-year__date { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--td-gold); margin: 0; }
.td-year__name { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0; color: var(--cream); }
.td-year__name a { color: inherit; text-decoration: none; }
.td-year__name a:hover { color: var(--td-gold); text-decoration: underline; }
.td-year__meaning { color: var(--td-parchment); font-size: 0.92rem; line-height: 1.5; }
.td-custom { display: flex; align-items: center; gap: 12px; }
.td-custom > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.td-save { z-index: 2; display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(12, 21, 16, 0.94); border: 1px solid var(--td-goldline); }
.td-save .button { justify-self: start; }
.td-save .button[disabled] { opacity: 0.5; cursor: default; }
.td-save--sticky { position: sticky; bottom: 84px; }
@media (min-width: 701px) { .td-save--sticky { bottom: 16px; } }

/* Holy pages */
.td-summary { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500; font-size: 1.3rem; line-height: 1.4; color: var(--cream); }
.td-paras { display: grid; gap: 10px; }
.td-bullets { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; line-height: 1.6; }
.td-bullets li::marker { color: var(--td-gold); }
.td-sources { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.td-sources a { color: var(--td-gold); }

@media (max-width: 420px) {
  .td-moon__phase { font-size: 1.85rem; }
  .td-moon--compact .td-moon__phase { font-size: 1.3rem; }
  .td-holiday__name { font-size: 1.5rem; }
  .td-hour__time { width: 92px; }
}

/* Section labels written as headings keep the small eyebrow look */
.td-page h2.sp-eyebrow { font-family: inherit; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.18em; line-height: 1.4; margin: 0; }
.td-page h1, .td-page h2, .td-page h3 { max-width: none; }
.td-page [hidden] { display: none !important; }
.td-reminder { justify-content: center; }

/* Your covens (today/coven-today.js) */
.td-covens { display: grid; gap: 8px; }
.td-coven-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.td-coven-item a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; color: inherit; text-decoration: none; border-radius: 12px; }
.td-coven-item a:hover, .td-coven-item a:focus-visible { background: rgba(226, 195, 109, 0.08); }
.td-coven-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(226, 195, 109, 0.5); display: grid; place-items: center; color: var(--gold, #e2c36d); }
.td-coven-item--turn .td-coven-icon { background: var(--gold, #e2c36d); color: var(--charcoal, #102118); }
.td-coven-item span > .sp-caption { display: inline; }

/* To tend (/today/tend/) and Today's "To tend today" card. */
.tn-head { display: grid; gap: 6px; }
.tn-title { font-family: "Cormorant Garamond", serif; font-size: 2.2rem; margin: 0; }
.tn-group { margin: 12px 0 0; }
.tn-item { display: grid; gap: 10px; padding: 14px; }
.tn-item--ending { border-color: var(--gold, #e2c36d); }
.tn-item__head { display: flex; gap: 12px; align-items: flex-start; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.tn-item__text { display: grid; gap: 2px; min-width: 0; }
.tn-item__text strong { overflow-wrap: anywhere; }
.tn-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(226, 195, 109, 0.4); display: grid; place-items: center; color: var(--gold, #e2c36d); }
.tn-private { color: #8fa684; }
.tn-panel { display: grid; gap: 12px; padding-top: 4px; }
.tn-form { display: grid; gap: 10px; }
.tn-check { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tn-radio input { margin: 0 4px 0 0; }
.td-tend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.td-tend-list a { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; color: inherit; text-decoration: none; border-radius: 12px; }
.td-tend-list a:hover, .td-tend-list a:focus-visible { background: rgba(226, 195, 109, 0.08); }

/* The two tabs, Today and Sky & Lore (js/segmented-switch.js): each lays out as the page does. */
.td-page .seg-switch { margin-bottom: 0; }
.td-tab { display: grid; gap: 22px; min-width: 0; }
.td-customise { text-align: center; margin: 1.25rem 0 0.5rem; }
