/* رایزن — مهمانان و وفاداری، رستوران و تالارها، بازار و رقبا */

.g-small { font-size: 12.5px; line-height: 1.85; }
.g-h4 { font-size: 13.5px; margin: 4px 0 4px; }
.g-big { font-size: 44px; font-weight: 800; line-height: 1.2; color: var(--ink); letter-spacing: -0.5px; margin: 2px 0 6px; }

/* زبانه‌ها */
.g-tabs { display: flex; gap: 2px; margin: 22px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.g-tabs button { border: 0; background: transparent; padding: 10px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; }
.g-tabs button:hover { color: var(--ink); }
.g-tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--brass); }

/* بخش‌ها */
.g-seglist { display: grid; align-content: start; }
.g-seg-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin: -4px 0 6px; }
.g-seg-legend i { display: inline-block; width: 12px; height: 4px; border-radius: 4px; margin-inline-end: 5px; vertical-align: middle; }
.g-seg { display: grid; grid-template-columns: 118px minmax(0, 1fr) 54px; gap: 4px 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.g-seg-name { display: grid; grid-template-columns: 10px 1fr; column-gap: 7px; align-items: center; line-height: 1.4; }
.g-seg-name i { width: 9px; height: 9px; border-radius: 9px; grid-row: span 2; }
.g-seg-name b { font-size: 13px; }
.g-seg-name small { color: var(--muted); font-size: 11.5px; grid-column: 2; }
.g-seg-bars { display: grid; gap: 4px; }
.g-seg-bars .bar-track { height: 6px; }
.g-seg-num { display: grid; justify-items: end; line-height: 1.3; }
.g-seg-num b { font-size: 14px; }
.g-seg-num small { font-size: 10.5px; color: var(--muted); }
.g-seg-act { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); line-height: 1.75; }

.g-who { display: grid; line-height: 1.5; }
.g-who small { color: var(--muted); font-size: 11.5px; }
.g-table tr.g-divider td { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 10px; }
.g-pareto p { color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }

/* کارت عضویت */
.g-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.g-tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.g-card { margin: 14px 14px 0; aspect-ratio: 1.586; max-width: 100%; border-radius: 14px; padding: 14px 16px; display: grid; grid-template-rows: auto 1fr auto; color: #f4efe3; position: relative; overflow: hidden; }
.g-card::after {
  content: ''; position: absolute; inset-inline-end: -40px; bottom: -40px; width: 160px; height: 160px; opacity: 0.16;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 4L40.2 12.2L51.8 12.2L51.8 23.8L60 32L51.8 40.2L51.8 51.8L40.2 51.8L32 60L23.8 51.8L12.2 51.8L12.2 40.2L4 32L12.2 23.8L12.2 12.2L23.8 12.2Z' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.g-tier-firouzeh .g-card { background: #0e7a66; }
.g-tier-lajvard .g-card { background: #243a66; }
.g-tier-zarrin .g-card { background: #c9a35a; color: #1b1406; }
.g-tier-zarrin .g-card::after { filter: invert(1); }
.g-card-top { display: flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-size: 20px; }
.g-card-top svg { width: 28px; height: 28px; }
.g-card-name { align-self: end; font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.g-card-foot { font-size: 11.5px; opacity: 0.85; }
.g-tier-body { padding: 12px 16px 16px; }
.g-tier-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 8px; }
.g-tier-stats div { display: grid; line-height: 1.35; }
.g-tier-stats b { font-size: 16px; }
.g-tier-stats small { font-size: 11px; color: var(--muted); }
.g-tier ul { margin: 0; padding-inline-start: 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.g-controls { align-self: start; position: sticky; top: calc(var(--top-h) + 12px); }
.g-verdict p { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }

/* زمان‌بندی پیشنهاد */
.g-formula { font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.g-lead { position: relative; overflow: visible; background: var(--surface-3); }
.g-lead-iqr { position: absolute; top: 0; bottom: 0; background: var(--turq-soft); border-radius: 99px; }
.g-lead-med { position: absolute; top: -3px; width: 3px; height: 14px; background: var(--turq-strong); border-radius: 2px; transform: translateX(50%); }
.g-timeline { display: grid; gap: 0; padding: 10px 18px 14px; }
.g-tl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 128px; gap: 14px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); }
.g-tl-row:last-child { border-bottom: 0; }
.g-tl-label, .g-tl-meta { display: grid; line-height: 1.4; }
.g-tl-label b, .g-tl-meta b { font-size: 13px; }
.g-tl-label small, .g-tl-meta small { font-size: 11px; color: var(--muted); }
.g-tl-track { position: relative; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12)); border-radius: 4px; }
.g-tl-valley { position: absolute; top: 5px; bottom: 5px; background: var(--brass); opacity: 0.55; border-radius: 3px; }
.g-tl-link { position: absolute; top: 50%; height: 2px; background: var(--turq); opacity: 0.5; transform: translateY(-50%); }
.g-tl-send { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 99px; background: var(--turq); border: 2px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--turq); }
.g-tl-send.urgent { background: var(--pom); box-shadow: 0 0 0 1px var(--pom); }
.g-tl-axis { min-height: 30px; }
.g-tl-axis .g-tl-track { background: none; height: 20px; }
.g-tl-axis .g-tl-track span { position: absolute; top: 0; font-size: 11px; color: var(--muted); transform: translateX(-2px); white-space: nowrap; border-left: 1px solid var(--line-strong); padding-left: 4px; line-height: 20px; }
.g-tl-axis .g-tl-track span.today { color: var(--brass-strong); font-weight: 700; border-color: var(--brass); }
.g-nights { display: flex; flex-wrap: wrap; gap: 6px; }
.g-list { margin: 0; padding-inline-start: 18px; font-size: 13px; color: var(--ink-2); line-height: 2; }

/* کوهورت */
.g-cohort td.g-heat { background: color-mix(in srgb, var(--turq) calc(var(--a) * 55%), transparent); font-weight: 600; }
.g-cohort td, .g-cohort th { white-space: nowrap; }

/* ---------- رستوران و تالارها ---------- */
.f-classes { display: grid; gap: 0; align-content: start; padding-top: 8px; }
.f-class { padding: 10px 0; border-bottom: 1px solid var(--line); }
.f-class:last-child { border-bottom: 0; }
.f-class-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.f-class-head small { color: var(--muted); font-size: 12px; }
.f-class p { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.f-class .f-names { color: var(--muted); font-size: 12px; margin-top: 2px; }
.f-rp th[scope='row'] { display: grid; font-size: 12.5px; color: var(--ink); line-height: 1.4; position: static; }
.f-rp th[scope='row'] small { color: var(--muted); font-weight: 400; font-size: 11px; }
.f-rp td.f-heat { text-align: center; background: color-mix(in srgb, var(--brass) calc(var(--a) * 60%), transparent); font-weight: 600; font-size: 12.5px; }
.f-ribbon { position: relative; height: 58px; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.f-lunar { position: absolute; top: 0; bottom: 0; display: grid; align-content: center; padding: 0 8px; border-left: 2px solid var(--surface); overflow: hidden; direction: rtl; text-align: right; }
.f-lunar b { font-size: 12.5px; white-space: nowrap; }
.f-lunar small { font-size: 10.5px; opacity: 0.8; white-space: nowrap; }
.f-lunar.f-high { background: var(--brass); color: #fff; }
.f-lunar.f-mid { background: var(--turq-soft); color: var(--ink); }
.f-lunar.f-low { background: var(--line-strong); color: var(--ink); }
.f-thursdays { list-style: none; margin: 0; padding: 0; display: grid; }
.f-th { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; border-inline-start: 3px solid transparent; padding-inline-start: 10px; }
.f-th:last-child { border-bottom: 0; }
.f-th time { display: grid; font-weight: 700; font-size: 12.5px; line-height: 1.4; }
.f-th time small { font-weight: 400; color: var(--muted); font-size: 11px; }
.f-th em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.f-th.f-high { border-inline-start-color: var(--brass); }
.f-th.f-low { border-inline-start-color: var(--line-strong); color: var(--ink-2); }
.f-th.f-mid { border-inline-start-color: var(--turq-soft); }

/* ---------- بازار ---------- */
.m-facts { display: grid; gap: 10px; align-content: start; }
.m-fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 4px; }
.m-fact small { color: var(--muted); font-size: 12px; }
.m-fact b { font-size: 16px; line-height: 1.6; }
.m-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.m-timeline li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.m-timeline li:last-child { border-bottom: 0; }
.m-timeline time { font-size: 12px; color: var(--brass-strong); font-weight: 700; line-height: 1.6; }
.m-timeline b { font-size: 13.5px; }
.m-timeline p { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin: 2px 0 4px; }
.m-rule { padding: 10px 0; border-bottom: 1px solid var(--line); }
.m-rule:last-child { border-bottom: 0; }
.m-rule h4 { font-size: 13.5px; margin-bottom: 2px; }
.m-rule p { font-size: 12.5px; color: var(--ink-2); line-height: 1.85; margin-bottom: 4px; }
.m-gap { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; border-inline-start: 4px solid var(--turq); }
.m-gap-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--turq-tint); color: var(--turq-strong); display: grid; place-items: center; }
.m-gap-icon svg { width: 26px; height: 26px; }
.m-gap h3 { font-size: 16px; margin-bottom: 4px; }
.m-gap p { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; max-width: 90ch; }
.m-gap-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.m-dot { width: 4px; height: 4px; border-radius: 4px; background: var(--line-strong); display: inline-block; }
.m-implications { margin: 0; padding: 0; list-style: none; counter-reset: imp; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.m-implications li { counter-increment: imp; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.9; position: relative; }
.m-implications li::before { content: counter(imp, persian); display: block; font-size: 22px; font-weight: 800; color: var(--brass); line-height: 1.2; margin-bottom: 4px; }
.m-implications b { color: var(--ink); display: block; font-size: 14px; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1180px) {
  .g-tiers { grid-template-columns: minmax(0, 1fr); }
  .g-tier { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); grid-template-rows: auto; }
  .g-card { margin: 14px; }
  .g-controls { position: static; }
}
@media (max-width: 900px) {
  .g-tl-row { grid-template-columns: 96px minmax(0, 1fr); }
  .g-tl-meta { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: start; gap: 8px; padding-bottom: 6px; }
  .g-tl-axis > div:last-child { display: none; }
  .g-big { font-size: 34px; }
}
@media (max-width: 560px) {
  .g-tier { grid-template-columns: minmax(0, 1fr); }
  .g-card { width: min(320px, calc(100% - 28px)); justify-self: start; }
  .g-seg { grid-template-columns: 104px minmax(0, 1fr) 46px; }
  .g-tl-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 0; }
  .g-tl-axis > div:first-child { display: none; }
  .f-th { grid-template-columns: 78px minmax(0, 1fr); }
  .f-th em { grid-column: 2; }
  .m-timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .m-gap { grid-template-columns: minmax(0, 1fr); }
  .g-tabs button { padding: 10px 11px; font-size: 13px; }
}
