/* Good days (web/auspicious-days/): purpose, month and city controls, the month grid with a dot per day, the
   selected day's detail, the best five windows and the reading prompt. Page-only classes, prefixed gd-. Tokens only;
   bar widths are set from auspicious-days.js. */

.gd-main { gap: 0; padding-top: 0; }
.gd-hero { display: flex; flex-direction: column; padding: var(--hero-pad) 0 clamp(28px, 4vw, 40px); }
.gd-lead { max-width: 60ch; margin-top: 20px; }
.gd-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-top: 30px; }
.gd-for { border: 0; margin: 0; padding: 0; }
.gd-for legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--text-meta); }
.gd-seg { flex-wrap: wrap; }
.gd-seg .icon { width: 15px; height: 15px; }
.gd-select { width: auto; }
.gd-status { margin-top: 16px; }

/* City: a button that opens a small search panel under it. */
.gd-city { position: relative; }
.gd-city-label { font-size: 13px; color: var(--text-meta); }
.gd-city-btn { min-height: 44px; max-width: 18em; font-weight: 400; font-size: 16px; }
.gd-city-btn .city-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gd-city-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(360px, calc(100vw - 2 * var(--gutter))); padding: 14px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }

/* Layout: calendar beside the detail, the reading prompt across the foot */
.gd-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--gap-split); padding-bottom: clamp(16px, 4vw, 32px); }
.gd-cal-col { flex: 1.2 1 380px; min-width: 0; }
.gd-side { flex: 1 1 340px; min-width: 0; }

/* The month grid */
.gd-weekdays, .gd-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--gap-grid-dense); }
.gd-weekdays { text-align: center; }
.gd-cal { margin-top: 8px; }
.gd-cal[aria-busy="true"] .gd-cell { opacity: 0.55; }
.gd-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 0; border: 0; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); color: var(--text-strong); font: inherit; cursor: pointer; transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.gd-cell:not(:disabled):hover { transform: var(--lift); }
.gd-cell[aria-pressed="true"] { background: var(--fill-selected); box-shadow: var(--ring-selected); }
.gd-cell:disabled { cursor: default; }
.gd-cell.is-blank { background: transparent; box-shadow: none; }
.gd-cell.is-past { opacity: 0.4; }
.gd-cell.is-none .gd-num, .gd-cell.is-failed .gd-num { color: var(--text-meta); }
.gd-cell.is-failed { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.gd-num { font-size: 15px; font-weight: 500; }
.gd-dot { flex: none; display: inline-block; border-radius: 50%; }
.gd-dot.b0 { width: 0; height: 0; }
.gd-dot.b1 { width: 4px; height: 4px; background: var(--color-neutral-600); }
.gd-dot.b2 { width: 7px; height: 7px; background: var(--color-accent-600); }
.gd-dot.b3 { width: 10px; height: 10px; background: var(--color-accent-300); }
.gd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; }

/* The selected day */
.gd-detail { display: flex; flex-direction: column; gap: 0; padding: 22px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--ring-selected); }
.gd-detail-date { margin-top: 10px; font: var(--font-heading-weight) 30px/1.15 var(--font-heading); letter-spacing: -0.02em; color: var(--text-strong); }
.gd-detail-time { margin-top: 6px; font-size: 20px; font-weight: 500; color: var(--text-strong); }
.gd-detail-none { margin-top: 10px; font-size: 15px; color: var(--text-body); }
.gd-score { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.gd-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--color-neutral-800); overflow: hidden; }
.gd-bar > span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--color-accent-300); }
.gd-score-num { font-size: 14px; color: var(--text-strong); white-space: nowrap; }
.gd-detail > .meta { margin-top: 6px; }
.gd-detail > .gd-ident { margin-top: 14px; color: var(--text-body); }
.gd-factors { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.gd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-tags .tag { white-space: normal; }

/* Best five windows */
.gd-top-head { margin-top: 28px; }
.gd-top { list-style: none; margin: 8px 0 0; padding: 0; }
.gd-top-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 6px; border: 0; border-radius: var(--radius-md); font: inherit; text-align: left; color: var(--text-strong); cursor: pointer; background: var(--rule) no-repeat bottom / 100% 1px; transition: background-color var(--dur) var(--ease); }
.gd-top-row:hover { background-color: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.gd-top-row[aria-current="true"] { background-color: var(--fill-selected); }
.gd-top-day { width: 34px; flex: none; font: var(--font-heading-weight) 22px/1.2 var(--font-heading); }
.gd-top-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gd-top-wd { font-size: 15px; font-weight: 500; }
.gd-top-score { font-size: 14px; color: var(--text-accent); }

/* Reading prompt */
.gd-prompt { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-accent-700); color: var(--text-strong); text-decoration: none; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.gd-prompt:hover { color: var(--text-strong); transform: var(--lift-feature); box-shadow: var(--ring-selected); }
.gd-prompt-planet { width: 52px; height: 52px; }
.gd-prompt-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gd-prompt .kicker { font-size: 12px; }
.gd-prompt-title { font: var(--font-heading-weight) 22px/1.2 var(--font-heading); letter-spacing: -0.02em; }
.gd-prompt-sub { font-size: 14px; color: var(--text-body); }

@media (max-width: 480px) {
  .gd-cal-col, .gd-side { flex-basis: 100%; }
  .gd-num { font-size: 14px; }
  .gd-detail-date { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-cell, .gd-prompt { transition: none; }
  .gd-cell:not(:disabled):hover, .gd-prompt:hover { transform: none; }
}
