@media screen {
  body[data-view="home"] {background:#f8f8fb;color:#292536}
  body[data-view="home"] .app-header,body[data-view="home"] .app-sidebar {background:#fff}
  body[data-view="home"] .app-sidebar nav a.active {background:#342c54;color:white}
  body[data-view="home"] .context-bar {display:none}
  body[data-view="home"] .context-bar.has-profile {display:flex}
  body[data-view="home"] .sidebar-note {display:none}
  body[data-view="home"] .sidebar-help {margin-top:auto}
  #workspace .story-hero {min-height:0;height:clamp(310px,25vw,395px);display:grid;align-items:center;position:relative;isolation:isolate;overflow:hidden;background:#172445;border-radius:18px}
  #workspace .story-hero picture {position:absolute;inset:0;z-index:-3}
  #workspace .story-hero img {position:static;width:100%;height:100%;object-fit:cover;object-position:center 34%;opacity:1;filter:none;transform:none}
  #workspace .story-hero:after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(13,22,58,.74),rgba(19,29,65,.3) 43%,transparent 67%);pointer-events:none}
  #workspace .story-hero .dashboard-hero-copy {position:relative;z-index:auto;max-width:56%;padding:clamp(26px,3.6vw,55px);color:white}
  .story-type {font-size:.95rem;line-height:1.4;font-weight:650;color:#e4defe}
  #workspace .story-hero h1 {font:760 clamp(2.35rem,3.35vw,3.7rem)/1.14 var(--font);letter-spacing:-.055em;color:#fff;margin:10px 0 0;word-break:keep-all}
  #workspace .story-hero .dashboard-hero-copy>p {font-size:1.06rem;color:#f0edf9;margin:12px 0 21px}
  .story-hero .action-solid {background:#fff;color:#262246}
  .story-hero .action-light {background:rgba(24,26,60,.66);border:1px solid #aaaac7;color:#fff}
  .story-hero .home-actions a {border-radius:9px;min-height:44px}
  .story-hero a:hover,.story-hero a:focus-visible {background:#e6e0ff;color:#292348}
  .story-picks {container-type:inline-size;margin:clamp(24px,2.5vw,40px) 0 28px}
  .story-picks h2,.next-date-card h2 {margin:0 0 15px;color:#211f2b;font:720 clamp(1.35rem,1.85vw,1.8rem)/1.3 var(--font);letter-spacing:-.045em}
  .story-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,1.2vw,21px)}
  .story-tile {display:block;min-width:0;text-decoration:none;color:inherit;background:white;border:1px solid #e5e3eb;border-radius:14px;overflow:hidden}
  .story-tile:focus-visible,.story-hero a:focus-visible,.next-date-card a:focus-visible {outline:3px solid #8464cd;outline-offset:3px}
  .story-illustration {aspect-ratio:1.65;overflow:hidden;background:#e6e3ee}
  .story-illustration img {display:block;width:100%;height:100%;object-fit:cover}
  .story-text {padding:13px clamp(10px,1.1vw,17px) 17px}
  .story-text>span {display:block;font-size:.875rem;font-weight:680;color:var(--story-ink,#5a447d)}
  .story-text h3 {margin:4px 0 5px;font:700 clamp(1.03rem,1.38vw,1.35rem)/1.35 var(--font);letter-spacing:-.048em;color:#262332;word-break:keep-all}
  .story-text p {margin:0;font-size:.92rem;line-height:1.5;color:#5a5667;word-break:keep-all}
  .story-chemistry {--story-ink:#a54057}.story-moving {--story-ink:#925414}.story-lotto {--story-ink:#69459c}.story-stocks {--story-ink:#345b99}.story-place {--story-ink:#146555}
  @media (hover:hover) {.story-tile:hover {border-color:#a69bc2;box-shadow:0 4px 18px #31274412}}
  #app-home .story-almanac {display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;margin:0}
  .story-almanac .today-card,.story-almanac .next-date-card {padding:20px 24px;background:#fff;border:1px solid #e5e3eb;border-radius:14px}
  .next-date {font-family:var(--font);display:flex;flex-wrap:wrap;align-items:baseline;gap:4px;color:#413957;margin:0 0 8px}
  .next-date span {font-size:1.125rem;color:#645a76}
  .next-date strong {font-size:2.5rem;font-weight:700;line-height:1.25}
  .next-date-card a {display:inline-flex;align-items:center;min-height:42px;text-decoration:underline;text-underline-offset:3px;color:#443657;font-size:1rem;font-weight:600}
  @media (min-width:951px) {body[data-view="home"] .app-workspace {padding-top:24px}}
  @media (max-width:950px) {body[data-view="home"] .app-sidebar nav a.active {background:#f5f2fa;color:#342c54;border-bottom-color:#584779}}
  @container (min-width:660px) {.story-grid {grid-template-columns:repeat(3,minmax(0,1fr))}}
  @container (min-width:980px) {.story-grid {grid-template-columns:repeat(5,minmax(0,1fr))}}
  @container (max-width:659px) {
    .story-grid>.story-tile:last-child:nth-child(odd) {grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center}
  }
  @media (max-width:700px) {
    body[data-view="home"] .app-workspace {padding:13px 13px 0}
    #workspace .story-hero {border-radius:14px;height:clamp(224px,65vw,305px)}
    #workspace .story-hero img {object-position:60% 25%}
    #workspace .story-hero:after {background:linear-gradient(90deg,rgba(15,23,57,.81),rgba(18,28,64,.55) 40%,transparent 72%),linear-gradient(0deg,#111a389c,transparent 45%)}
    #workspace .story-hero .dashboard-hero-copy {max-width:100%;width:100%;align-self:end;padding:16px}
    .story-type {font-size:.875rem}
    #workspace .story-hero h1 {font-size:clamp(1.65rem,6.8vw,2.5rem);margin-top:5px;max-width:66%}
    #workspace .story-hero .dashboard-hero-copy>p {margin:7px 0 13px;font-size:.94rem}
    .story-hero .home-actions {gap:7px}
    .story-hero .home-actions a {font-size:.93rem;min-height:42px;padding:7px 12px}
    .story-picks {margin:22px 0}
    .story-picks h2 {margin-bottom:11px}
    .story-grid {gap:13px 9px}
    .story-illustration {aspect-ratio:1.58}
    .story-tile {border-radius:11px}
    .story-text {padding:9px 10px 12px}
    .story-text h3 {font-size:1.06rem}
    .story-text p {font-size:.875rem}
    #app-home .story-almanac {grid-template-columns:1fr;gap:12px}
    .story-almanac .today-card,.story-almanac .next-date-card {padding:16px}
  }
}

@media screen {
 .story-grid>.story-tile { display:grid;grid-template-rows:subgrid;grid-row:span 4;row-gap:0 }
 .story-tile>.story-text { display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0 }
 @container (max-width:659px) {
  .story-grid>.story-tile:last-child:nth-child(odd) { grid-row:span 1;grid-template-rows:auto }
  .story-grid>.story-tile:last-child:nth-child(odd)>.story-text { display:block;grid-row:auto }
 }
}
