/* رایزن — سبک صفحه‌های اصلی (خلاصه امروز، پیش‌بینی، تقویم) */

/* ---------- خلاصه امروز ---------- */
.brief-greet { color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; align-self: center; }
.hs { display: grid; gap: 1px; text-align: start; padding: 12px 18px; border: 0; border-inline-start: 1px solid var(--line); background: transparent; color: var(--ink); }
.hs:first-child { border-inline-start: 0; }
.hs:hover { background: var(--turq-tint); }
.hs span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hs b { font-size: 26px; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.hs b em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.hs small { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.brief-legend { margin-top: 10px; width: fit-content;  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); }
.issues { display: grid; gap: 12px; }
.issue { display: grid; grid-template-columns: 54px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.issue-num {
  font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--ink-2); display: grid; justify-items: center; align-content: start;
  padding-top: 14px; background: var(--surface-2); border-inline-end: 1px solid var(--line); position: relative;
}
.issue-num::after { content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px; }
.issue-pom .issue-num::after { background: var(--pom); }
.issue-amber .issue-num::after { background: var(--amber); }
.issue-leaf .issue-num::after { background: var(--leaf); }
.issue-main { padding: 14px 18px 16px; min-width: 0; }
.issue-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.issue h3 { font-size: 17px; line-height: 1.6; margin-bottom: 4px; }
.issue p { color: var(--ink-2); font-size: 13.5px; line-height: 1.95; max-width: 78ch; }
.issue-metrics { display: flex; gap: 0; margin: 12px 0 2px; border-top: 1px dashed var(--line); padding-top: 10px; flex-wrap: wrap; }
.issue-metrics > div { display: grid; padding-inline-end: 22px; margin-inline-end: 22px; border-inline-end: 1px solid var(--line); gap: 0; }
.issue-metrics > div:last-child { border: 0; }
.issue-metrics span { font-size: 11.5px; color: var(--muted); }
.issue-metrics b { font-size: 15px; font-weight: 700; }
.issue-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.brief-side { display: grid; gap: 16px; align-content: start; }
.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.upcoming li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.upcoming li:last-child { border-bottom: 0; }
.upcoming time { font-weight: 600; font-size: 12.5px; display: grid; line-height: 1.35; }
.upcoming time small { color: var(--muted); font-weight: 400; font-size: 11px; }
.upcoming em { font-style: normal; font-size: 11px; color: var(--pom); background: var(--pom-tint); padding: 0 7px; border-radius: 99px; }
.upcoming li.up-block span { color: var(--brass-strong); font-weight: 600; }
.upcoming li.up-season span { color: var(--turq-strong); }
.open-decisions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.open-decisions li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.open-decisions li > div:first-child { display: grid; min-width: 0; }
.open-decisions b { font-size: 13.5px; }
.open-decisions span { font-size: 12.5px; color: var(--muted); }
.od-meta { display: grid; justify-items: end; gap: 2px; flex: none; }
.od-meta small { color: var(--faint); font-size: 11px; }
.signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.signal { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; border-inline-start: 3px solid var(--line-strong); }
.signal:hover { border-color: var(--line-strong); }
.signal svg { width: 20px; height: 20px; color: var(--muted); margin-top: 3px; }
.signal h4 { font-size: 14px; margin-bottom: 2px; line-height: 1.6; }
.signal p { font-size: 12.5px; color: var(--ink-2); line-height: 1.85; margin-bottom: 6px; }
.signal.tone-pom { border-inline-start-color: var(--pom); }
.signal.tone-amber { border-inline-start-color: var(--amber); }
.signal.tone-leaf { border-inline-start-color: var(--leaf); }
.signal.tone-brass { border-inline-start-color: var(--brass); }
.signal.tone-turq { border-inline-start-color: var(--turq); }

@media (max-width: 1100px) { .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hs b { font-size: 21px; } .hs span, .hs small { white-space: normal; } }
@media (max-width: 900px) {
  .issue { grid-template-columns: 40px minmax(0, 1fr); }
  .issue-num { font-size: 24px; }
  .issue-metrics > div { padding-inline-end: 12px; margin-inline-end: 12px; }
}

/* ---------- پیش‌بینی ---------- */
.fc-top { grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr); align-items: start; }
.controls .seg { width: 100%; }
.controls .seg button { flex: 1; }
.ctrl-grid { display: grid; gap: 14px; margin-top: 14px; }
.dvg-list { display: grid; gap: 2px; }
.dvg-row { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) 62px; align-items: center; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.dvg-row b { font-size: 12.5px; text-align: end; white-space: nowrap; }
.dvg { position: relative; height: 10px; background: linear-gradient(90deg, transparent calc(50% - 0.5px), var(--line-strong) calc(50% - 0.5px), var(--line-strong) calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.dvg i { position: absolute; top: 1px; bottom: 1px; width: var(--w); border-radius: 3px; }
.dvg i.pos { inset-inline-start: 50%; background: var(--leaf); }
.dvg i.neg { inset-inline-end: 50%; background: var(--pom); }
.monitor-lede { font-size: 13.5px; color: var(--ink-2); line-height: 1.95; margin-bottom: 12px; }
.monitor-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; overflow: hidden; }
.monitor-stats > div { display: grid; padding: 8px 12px; border-inline-start: 1px solid var(--line); }
.monitor-stats > div:first-child { border-inline-start: 0; }
.monitor-stats span { font-size: 11.5px; color: var(--muted); }
.monitor-stats b { font-size: 17px; }
.monitor-stats small { font-size: 11px; color: var(--faint); }
.impact-rows { display: grid; gap: 0; }
.impact-rows > div { display: grid; grid-template-columns: minmax(90px, 1fr) auto minmax(90px, auto) minmax(90px, auto); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.impact-rows span { font-weight: 600; }
.impact-rows b { font-size: 18px; }
.impact-rows em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.impact-rows small { text-align: end; font-weight: 600; }
.occ-cell { display: inline-grid; grid-template-columns: 70px auto; gap: 8px; align-items: center; }
.occ-cell i { height: 6px; background: linear-gradient(90deg, var(--turq) var(--w), var(--surface-3) var(--w)); border-radius: 99px; direction: ltr; }
.fc-table td { white-space: nowrap; }
.import-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.import-actions { display: flex; gap: 8px; }
.import code { background: var(--surface-3); border-radius: 4px; padding: 0 5px; direction: ltr; unicode-bidi: isolate; }
@media (max-width: 1180px) { .fc-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .dvg-row { grid-template-columns: 110px minmax(0, 1fr) 54px; }
  .impact-rows > div { grid-template-columns: 1fr auto; }
}

/* ---------- تقویم ---------- */
.cal-legend { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12.5px; color: var(--ink-2); }
.cal-legend .end { margin-inline-start: auto; display: flex; gap: 12px; }
.heat-legend { display: inline-flex; align-items: center; gap: 8px; }
.heat-legend i { width: 90px; height: 10px; border-radius: 99px; background: linear-gradient(to left, var(--surface-3), var(--turq)); border: 1px solid var(--line); }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); background: var(--surface); }
.sw.hol { box-shadow: inset 0 0 0 1.5px var(--pom); }
.sw.blk { border: 0; background: var(--brass); height: 5px; border-radius: 4px; }
.sw.bridge { background: repeating-linear-gradient(45deg, var(--brass) 0 2px, transparent 2px 5px); }
.sw.fc { border-style: dashed; border-color: var(--turq); }
.sw.occ { background: radial-gradient(circle at 70% 30%, var(--brass) 0 2.5px, transparent 3px), var(--surface); }
.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cal-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 12px 10px; }
.cal-mh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.cal-mh b { font-size: 15px; }
.cal-mh small { color: var(--muted); font-size: 11.5px; }
.cal-mh .chip { margin-inline-start: auto; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd span { text-align: center; font-size: 11px; color: var(--faint); padding-bottom: 2px; }
.cd { position: relative; border: 1px solid transparent; background: var(--surface-2); border-radius: 7px; aspect-ratio: 1 / 1.02; padding: 0; display: grid; place-content: center; gap: 0; line-height: 1.1; overflow: hidden; color: var(--ink); isolation: isolate; }
.cd::before { content: ''; position: absolute; inset: 0; background: var(--turq); opacity: calc(var(--o) * 0.85); z-index: -1; }
.cd b { font-size: 13px; font-weight: 700; }
.cd small { font-size: 9px; color: var(--ink-2); opacity: 0.75; }
.cd.empty { background: transparent; }
.cd.empty::before { display: none; }
.cd.hol b { color: var(--pom); }
.cd.hol { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pom) 55%, transparent); }
.cd.thu b { color: var(--amber); }
.cd.fc { border-style: dashed; border-color: color-mix(in srgb, var(--turq) 45%, transparent); }
.cd.bridge::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, var(--brass) 0 1.5px, transparent 1.5px 5px); opacity: 0.55; z-index: -1; }
.cd.blk { border-bottom: 3px solid var(--brass); border-radius: 7px 7px 3px 3px; }
.cd.occ::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 5px; height: 5px; border-radius: 99px; background: var(--brass); }
.cd.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.cd:hover { border-color: var(--ink-2); }
.cd[style*="--o:0.7"] b, .cd[style*="--o:0.8"] b, .cd[style*="--o:0.9"] b, .cd[style*="--o:1"] b { color: #fff; }
.cd[style*="--o:0.7"] small, .cd[style*="--o:0.8"] small, .cd[style*="--o:0.9"] small, .cd[style*="--o:1"] small { color: #eaf6f5; }
.timeline { padding: 16px 18px 12px; }
.tl-axis { position: relative; height: 18px; margin-inline-start: 190px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tl-axis span { position: absolute; top: 0; font-size: 11px; color: var(--muted); transform: translateX(50%); white-space: nowrap; }
.tl-lane { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 0; }
.tl-label { display: grid; line-height: 1.4; }
.tl-label b { font-size: 13px; }
.tl-label small { color: var(--muted); font-size: 11.5px; }
.tl-track { position: relative; height: 16px; background: var(--surface-2); border-radius: 99px; }
.tl-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 99px; }
.tl-bar.tone-pom { background: var(--pom); }
.tl-bar.tone-ink { background: var(--ink-2); }
.tl-bar.tone-leaf { background: var(--leaf); }
.tl-bar.tone-turq { background: var(--turq); }
.tl-bar.tone-brass { background: var(--brass); }
.tl-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--brass); }
.blocks-table td { vertical-align: top; }
.blocks-table tr.past td { opacity: 0.55; }
.blocks-table tbody tr { cursor: pointer; }
.blocks-table .advice { font-size: 12.5px; color: var(--ink-2); min-width: 220px; white-space: normal; }
.tpi { display: inline-grid; grid-template-columns: 46px auto; gap: 6px; align-items: center; }
.tpi i { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--brass) var(--w), var(--surface-3) var(--w)); direction: ltr; }
.rules { display: grid; gap: 4px; align-content: start; }
.rule { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rule p { font-size: 12.5px; color: var(--ink-2); }
.rule b { font-size: 12px; white-space: nowrap; }
.rule-days { display: flex; gap: 3px; }
.rd { width: 22px; height: 24px; border-radius: 5px; background: var(--surface-3); display: grid; place-items: center; position: relative; overflow: hidden; }
.rd small { font-size: 10.5px; color: var(--ink-2); position: relative; }
.rd.off { background: var(--pom-tint); box-shadow: inset 0 0 0 1.5px var(--pom); }
.rd.semi { background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px var(--amber); }
.rd.bridge { background: repeating-linear-gradient(45deg, var(--brass-tint) 0 3px, color-mix(in srgb, var(--brass) 45%, transparent) 3px 5px); box-shadow: inset 0 0 0 1.5px var(--brass); }
@media (max-width: 700px) {
  .tl-axis { margin-inline-start: 0; }
  .tl-lane { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rule { grid-template-columns: minmax(0, 1fr); }
  .cal-legend .end { margin-inline-start: 0; }
}
