/* IELTS home, end of page: the "Your week" panel as a game screen (like the Arena) with the otter bobbing beside it.
   Colours of the Vidi logo: aqua #56dadc and violet #8a72f6, on the Arena's night #140f2e; today in gold #ffc83d.
   Bevelled corners instead of rounded cards. Effects: numbers count up, the line draws itself, today pulses,
   links shine on hover. All motion stops under prefers-reduced-motion. */
body.ielts-dash-page .dash-more.week {
  --night: #140f2e; --aqua: #56dadc; --violet: #8a72f6; --violet-lite: #b9a8ff; --gold: #ffc83d;
  display: flex !important; flex-direction: column; gap: 14px; grid-template-columns: none !important;
  grid-column: 1 / -1 !important; width: 100% !important; max-width: none !important; align-items: stretch !important; justify-self: stretch !important;
}
body.ielts-dash-page .dash-more.week > * { width: 100%; max-width: none; }

/* ── The panel ── */
body.ielts-dash-page .week-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: end; gap: 8px 18px; padding: 24px 26px 14px; color: #eaf7ff;
  background: radial-gradient(700px 260px at 75% -20%, rgba(138, 114, 246, .45), transparent 60%), radial-gradient(520px 240px at 0% 120%, rgba(86, 218, 220, .28), transparent 60%), var(--night);
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); overflow: hidden; }
body.ielts-dash-page .week-panel::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 4px); pointer-events: none; }
body.ielts-dash-page .week-main { position: relative; min-width: 0; }
body.ielts-dash-page .week-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-bottom: 4px; }
body.ielts-dash-page .week-head h2 { margin: 0; font: 800 24px/1.45 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif; letter-spacing: .5px; text-transform: uppercase; padding-top: 2px;
  background: linear-gradient(180deg, #fff 30%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.ielts-dash-page .week-stats { display: none; gap: 22px; margin: 0; padding: 0; background: none !important; }
body.ielts-dash-page .dash-has-progress .week-stats { display: flex; }
body.ielts-dash-page .week-stats .dash-stat { display: flex; align-items: baseline; gap: 8px; min-height: 0; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.ielts-dash-page .week-stats .dash-stat strong { font: 800 40px/1 'Baloo 2', 'Be Vietnam Pro', sans-serif; color: var(--aqua) !important; text-shadow: 0 0 18px rgba(86, 218, 220, .8); font-variant-numeric: tabular-nums; }
body.ielts-dash-page .week-stats .dash-stat + .dash-stat strong { color: var(--violet-lite) !important; text-shadow: 0 0 18px rgba(138, 114, 246, .9); }
body.ielts-dash-page .week-stats .dash-stat > span { color: #b8c4e6; font-size: 13px; line-height: 1.3; }

/* ── The chart: neon line, gold today ── */
body.ielts-dash-page .week-panel .dash-chart { height: 190px; background: none !important; }
body.ielts-dash-page .week-panel .dash-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
body.ielts-dash-page .week-panel .dash-chart .grid { stroke: rgba(150, 170, 255, .14); stroke-width: 1; }
body.ielts-dash-page .week-panel .dash-chart .axis { fill: #8c96c4; font-size: 11px; font-family: inherit; }
body.ielts-dash-page .week-panel .dash-chart .area { fill: url(#week-fill); stroke: none; }
body.ielts-dash-page .week-panel .dash-chart .line { fill: none; stroke: var(--aqua); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 7px var(--aqua)); }
body.ielts-dash-page .week-panel .dash-chart .dot { fill: var(--night); stroke: var(--aqua); stroke-width: 2; }
body.ielts-dash-page .week-panel .dash-chart .dot.today { fill: var(--gold); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 8px var(--gold)); transform-box: fill-box; transform-origin: center; animation: week-pulse 1.8s ease-in-out 1.4s infinite; }
body.ielts-dash-page .week-panel .dash-chart .tag rect { fill: var(--aqua); stroke: none; }
body.ielts-dash-page .week-panel .dash-chart .tag text { fill: var(--night); font-size: 11px; font-weight: 800; text-anchor: middle; font-family: inherit; }
body.ielts-dash-page .week-panel .dash-chart.is-drawing .line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: week-draw 1.4s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
body.ielts-dash-page .week-panel .dash-chart.is-drawing :is(.area, .tag) { opacity: 0; animation: week-fade .7s ease 1.1s forwards; }
@keyframes week-draw { to { stroke-dashoffset: 0; } }
@keyframes week-fade { to { opacity: 1; } }
@keyframes week-pulse { 50% { transform: scale(1.35); } }

/* ── The otter (from the gradient option) ── */
body.ielts-dash-page .week-otter { position: relative; align-self: end; width: 190px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .45)); animation: week-bob 3.2s ease-in-out infinite; }
@keyframes week-bob { 50% { transform: translateY(-8px) rotate(-2deg); } }

/* ── Links: bevelled buttons in aqua, violet and gold, with a shine on hover ── */
body.ielts-dash-page .week-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; }
body.ielts-dash-page .week-links a { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; overflow: hidden; color: var(--night); background: var(--aqua);
  font-size: 15px; font-weight: 800; text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: transform .18s; }
body.ielts-dash-page .week-links a:nth-child(2) { background: var(--violet-lite); }
body.ielts-dash-page .week-links a:nth-child(3) { background: var(--gold); }
body.ielts-dash-page .week-links a::after { content: '→'; transition: transform .18s; }
body.ielts-dash-page .week-links a::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s; }
body.ielts-dash-page .week-links a:hover { transform: translateY(-2px); }
body.ielts-dash-page .week-links a:hover::after { transform: translateX(4px); }
body.ielts-dash-page .week-links a:hover::before { transform: translateX(120%); }
body.ielts-dash-page .week-links a:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

/* The results wall shows here only once it has verified learners (the link above covers the empty case) */
body.ielts-dash-page .dash-more.week > .rw-dash:not(:has(.rw-dash-list)) { display: none !important; }
body.ielts-dash-page .dash-more.week > .rw-dash { color: #eaf7ff !important; background: var(--night) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
body.ielts-dash-page .dash-more.week > .rw-dash :is(h2, b, strong) { color: #fff !important; }
body.ielts-dash-page .dash-more.week > .rw-dash :is(p, small) { color: #b8c4e6 !important; }
body.ielts-dash-page .dash-more.week > .rw-dash a { color: var(--aqua) !important; }
body.ielts-dash-page .dash-more.week .rw-dash-cta { color: var(--night) !important; background: var(--gold) !important; background-image: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

/* Pro: the challenge promo only repeated the link. Free: the upgrade offer as one slim bevelled bar. */
body.ielts-dash-page[data-pro="true"] .dash-more.week .dash-promo { display: none !important; }
body.ielts-dash-page .dash-more.week .dash-promo { display: flex !important; align-items: center; gap: 12px; min-height: 0 !important; padding: 14px 18px !important; color: #eaf7ff !important;
  background: linear-gradient(100deg, #2a1d6b, #1d3f63) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
body.ielts-dash-page .dash-more.week .dash-promo img { display: none !important; }
body.ielts-dash-page .dash-more.week .dash-promo > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; width: 100%; }
body.ielts-dash-page .dash-more.week .dash-promo h2 { margin: 0; font-size: 16px !important; color: #fff !important; }
body.ielts-dash-page .dash-more.week .dash-promo p { margin: 0; flex: 1 1 220px; color: #c9d3f2 !important; font-size: 14px; }
body.ielts-dash-page .dash-more.week .dash-promo .btn { min-height: 40px; color: var(--night) !important; background: var(--gold) !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

@media (max-width: 640px) {
  body.ielts-dash-page .week-panel { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 12px; }
  body.ielts-dash-page .week-otter { position: absolute; right: -8px; top: 4px; width: 104px; margin: 0; }
  body.ielts-dash-page .week-head { padding-right: 88px; }
  body.ielts-dash-page .week-stats { gap: 18px; }
  body.ielts-dash-page .week-stats .dash-stat strong { font-size: 32px; }
  body.ielts-dash-page .week-panel .dash-chart { height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  body.ielts-dash-page :is(.week-otter, .week-panel .dash-chart .dot.today) { animation: none !important; }
  body.ielts-dash-page .week-panel .dash-chart.is-drawing :is(.line, .area, .tag) { animation: none !important; stroke-dashoffset: 0; opacity: 1; }
  body.ielts-dash-page .week-links a, body.ielts-dash-page .week-links a::before { transition: none !important; }
}
body.ielts-dash-page .week-panel .dash-chart.is-waiting :is(.line, .area, .tag) { opacity: 0; }
