:root {
  --ink: #292448;
  --muted: #706b89;
  --purple: #6c5ce7;
  --purple-dark: #5142c7;
  --pink: #fd79a8;
  --yellow: #ffd166;
  --mint: #55d6be;
  --paper: #ffffff;
  --border: #dfd9f4;
  --shadow: 0 18px 50px rgba(67,49,134,.14);
}

* { box-sizing: border-box; }
button { font: inherit; }
.hidden { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(253,121,168,.2), transparent 27%),
    radial-gradient(circle at 92% 14%, rgba(85,214,190,.2), transparent 25%),
    radial-gradient(circle at 50% 100%, rgba(255,209,102,.22), transparent 30%),
    #f5f2ff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.home-shell { width: min(1040px, calc(100% - 28px)); margin: 0 auto; padding: 42px 0 60px; }
.user-toolbar { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.session-controls { display:flex; min-height:38px; align-items:center; justify-content:flex-end; gap:10px; margin-left:auto; color:var(--muted); font-weight:900; }
.session-controls button { padding:7px 11px; color:var(--purple); border:2px solid var(--border); border-radius:11px; background:white; font-weight:900; cursor:pointer; }
.home-actions { display: flex; justify-content: flex-start; }
.metrics-menu { position: relative; }
.metrics-menu summary { min-width: 145px; padding: 12px 18px; border: 0; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--purple), var(--pink)); box-shadow: 0 9px 22px rgba(81,66,199,.24); font-weight: 900; text-align: center; cursor: pointer; list-style: none; }
.metrics-menu summary::-webkit-details-marker { display: none; }
.metrics-menu summary::after { content: " ▾"; }
.metrics-menu[open] summary::after { content: " ▴"; }
.metrics-menu-options { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; display: grid; width: min(270px, calc(100vw - 28px)); overflow: hidden; border: 2px solid var(--border); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.metrics-menu-options a { padding: 14px 18px; color: var(--ink); font-weight: 900; text-decoration: none; }
.metrics-menu-options a + a { border-top: 1px solid var(--border); }
.metrics-menu-options a:hover, .metrics-menu-options a:focus-visible { color: var(--purple); background: #f5f2ff; outline: none; }
.home-hero { display: flex; align-items: center; gap: 24px; margin-bottom: 38px; }
.home-mascot { width: 155px; height: 155px; flex: 0 0 auto; border: 5px solid white; border-radius: 40px; object-fit: cover; box-shadow: var(--shadow); transform: rotate(-3deg); }
.eyebrow { margin: 0 0 6px; color: var(--purple); font-size: .82rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.7rem, 7vw, 5rem); line-height: .95; letter-spacing: -.06em; }
.home-intro { margin: 14px 0 0; color: var(--muted); font-size: 1.15rem; font-weight: 800; }

.practice-section { padding: clamp(24px, 5vw, 45px); border: 1px solid rgba(255,255,255,.75); border-radius: 36px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.section-heading { margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: -.04em; }
.practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.practice-card { display: grid; min-width: 0; min-height: 145px; gap: 16px; padding: 20px; border: 2px solid var(--border); border-radius: 24px; background: white; }
.practice-card.available { grid-column: 1 / -1; min-height: 175px; color: white; border: 0; background: linear-gradient(135deg, var(--purple), var(--pink)); box-shadow: 0 16px 34px rgba(81,66,199,.3); cursor: pointer; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.practice-card.available:hover { transform: translateY(-5px); box-shadow: 0 21px 42px rgba(81,66,199,.35); }
.practice-card.available:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }
.card-symbol { display: grid; place-items: center; width: 82px; height: 82px; flex: 0 0 auto; border-radius: 25px; color: var(--purple); background: #f1edff; font-size: 3.8rem; font-weight: 900; line-height: 1; }
.available .card-symbol { color: var(--purple); background: white; }
.card-symbol.image-symbol { overflow: hidden; padding: 0; border: 4px solid white; background: white; }
.card-symbol.image-symbol img { width: 100%; height: 100%; object-fit: cover; }
.card-heading { display: flex; min-width: 0; align-items: center; gap: 16px; }
.card-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: 5px; }
.card-copy strong { font-size: clamp(1.35rem, 3vw, 2rem); }
.card-copy small { color: var(--muted); font-size: .95rem; font-weight: 800; }
.available .card-copy small { color: rgba(255,255,255,.85); }
.table-suggestion { display: flex; width: 100%; max-width: 100%; box-sizing: border-box; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 10px 8px 12px; justify-self: stretch; color: #4236a8; border: 0; border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 88%); font-size: .9rem; font-weight: 900; line-height: 1.3; text-align: right; }
.table-suggestion.loading, .table-suggestion.unavailable { color: rgba(255,255,255,.9); background: rgba(255,255,255,.15); }
.suggestion-button { flex: 0 0 auto; padding: 7px 11px; color: white; border: 0; border-radius: 9px; background: var(--purple); font-size: .82rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 10px rgba(81,66,199,.2); }
.suggestion-button:hover { background: var(--purple-dark); }
.suggestion-button.hidden { display: none; }
.accounts-card .card-symbol { font-size: 1.55rem; letter-spacing: -.08em; }

@media (max-width: 720px) {
  .home-shell { padding-top: 24px; }
  .user-toolbar { flex-wrap: wrap; }
  .home-hero { align-items: flex-start; gap: 16px; }
  .home-mascot { width: 105px; height: 105px; border-radius: 30px; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice-card.available { grid-column: auto; }
  .table-suggestion { align-items: flex-end; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
