/* New year resolution picker. Builds on site.css + tools.css tokens. */

[data-rz] [hidden] { display: none !important; }
[data-rz] .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.rz-hint-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; margin-top: 0.7rem; }
.rz-hint-row .t-hint { margin: 0; }
.t-chips input:disabled { cursor: not-allowed; }
.t-chips input:disabled + span { opacity: 0.45; }
.rz-size-help { margin: 0.7rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }

.rz-ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rz-idea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1rem; padding: 0.95rem 1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); animation: rz-in 320ms var(--ease) both; }
.rz-idea.is-picked { border-color: var(--clay); background: #fff8f1; }
.rz-idea > div { flex: 1 1 14rem; min-width: 0; }
.rz-idea-t { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.35; color: var(--ink); }
.rz-tag { display: inline-block; margin-top: 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--clay-ink); background: rgba(176, 89, 51, 0.09); border-radius: 999px; padding: 0.15rem 0.6rem; }
.rz-idea .btn { flex: none; }
.rz-idea .btn[aria-pressed="true"] { background: var(--clay); }
@keyframes rz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rz-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.88rem; }
.rz-empty { margin: 0; color: var(--muted); }
.rz-shuffle-row { margin-top: 0.9rem; }

.rz-edit-grid { display: grid; gap: 0.9rem; }
.rz-edit-grid .t-textarea { min-height: 4.4rem; }

/* The card: shown on screen, and the only thing printed */
.rz-card { background: #fffdf9; border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.2rem, 4vw, 2rem); box-shadow: 0 30px 60px -40px rgba(72, 43, 24, 0.45); color: #1c1814; display: grid; gap: 1.1rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rz-k { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay-ink); }
.rz-res { margin: 0.3rem 0 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.45rem, 3.4vw, 2rem); line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.rz-res:focus { outline: none; }
.rz-card.is-empty .rz-res, .rz-card.is-empty .rz-p { color: #a19384; }
.rz-row { display: grid; gap: 0.25rem; }
.rz-row > span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7a6c5d; }
.rz-p { margin: 0; font-size: 1.02rem; line-height: 1.5; overflow-wrap: anywhere; }
.rz-aff { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.rz-lines { height: 4.6rem; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.9rem - 1px), rgba(28, 24, 20, 0.28) calc(1.9rem - 1px), rgba(28, 24, 20, 0.28) 1.9rem); }
.rz-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.rz-days li { aspect-ratio: 1.25; border: 1px solid rgba(28, 24, 20, 0.35); border-radius: 6px; font-size: 0.7rem; color: #7a6c5d; padding: 0.15rem 0.25rem; margin: 0; }
.rz-foot { margin: 0; font-size: 0.78rem; color: #7a6c5d; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rz-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }

/* Idea lists in the article */
.rz-list { padding-left: 1.25rem; }
.rz-list .rz-tag { margin: 0 0 0 0.4rem; font-size: 0.7rem; padding: 0.05rem 0.5rem; vertical-align: 0.1em; }

[data-rz] .tool-preview { position: static; }
@media (max-width: 900px) {
  [data-rz] .tool-preview { order: 0; }
}
@media (max-width: 560px) {
  .rz-idea .btn { width: 100%; justify-content: center; }
  .rz-actions .btn { flex: 1 1 100%; justify-content: center; }
  .rz-card { padding: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rz-idea { animation: none; }
}

@media print {
  @page { size: auto; margin: 14mm; }
  html, body { background: #fff !important; }
  body > :not(main) { display: none !important; }
  main > :not([data-rz]) { display: none !important; }
  [data-rz] { display: block; width: auto; margin: 0; padding: 0; }
  [data-rz] .tool-controls { display: none !important; }
  [data-rz] .tool-preview { position: static; display: block; margin: 0; }
  [data-rz] .tool-preview > :not(.rz-card) { display: none !important; }
  .rz-card { max-width: 182mm; margin: 0 auto; border: 0.5pt solid #bdb2a3; border-radius: 4mm; box-shadow: none; padding: 9mm; break-inside: avoid; page-break-inside: avoid; }
  .rz-res { font-size: 22pt; }
  .rz-days li { border-color: #6e6052; }
}
