/* Study Atlas home: what the home page adds on top of styles.css (the Pattern Atlas sheet, unchanged). Lines from the
   approved design (reference.html, "atlas chooser (home)") are kept as they are, except its filter-chip rules
   (.chips, .chip), which no view renders and which would restyle the shared "new version" chip. The CSP allows no
   inline style attributes, so the reference's few fixed inline styles are the small classes at the end. */
html, body{margin:0}
.logo.home-logo{background:#1d1c22; color:var(--warm)}
.home{max-width:60rem}
.hero h1{max-width:16ch}
.hero .lead{max-width:52ch}
.hero .scene .lbk{white-space:nowrap}
.next .row{display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-top:18px}
.next .row .meta{color:var(--muted); font-size:.92rem}
.next-h{display:flex; gap:16px; align-items:flex-start}
.next{padding:24px 26px; margin-top:28px}
.next h2{margin:2px 0 6px}
.next p:not(.eyebrow){color:var(--muted)}

/* toolbar */
.tools{margin-top:48px}
.tools .search{min-height:54px}
.tools .search input{height:50px}
.tools .search kbd{font-family:var(--f-mono); font-size:.78rem; color:var(--faint); border:1px solid var(--line-strong); border-radius:6px; padding:1px 7px; background:var(--sunk)}
.tools .search .clear{border:0; background:var(--sunk); color:var(--muted); width:28px; height:28px; border-radius:50%; cursor:pointer; display:none; place-items:center; font-size:1rem; line-height:1}
.tools .search.has .clear{display:grid}
.tools .search.has kbd{display:none}
.trow{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:12px}
.trow .grow{flex:1}
.trow .found{color:var(--muted); font-size:.92rem}
/* groups */
.grp{margin-top:36px}
.grp-h{display:flex; align-items:baseline; gap:12px; margin-bottom:4px}
.grp-h h2{font-size:1.45rem}
.grp-h .ct{color:var(--faint); font-size:.9rem; font-variant-numeric:tabular-nums}
.grp > .sub{color:var(--muted); margin-bottom:16px; font-size:.97rem}

/* atlas cards */
.grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(268px, 1fr)); gap:14px}
.ac{position:relative; display:flex; flex-direction:column; gap:10px; padding:20px 20px 16px; border-radius:18px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); text-decoration:none; color:var(--ink); transition:transform .15s, box-shadow .15s, border-color .15s; overflow:hidden}
.ac::before{content:""; position:absolute; inset:0 0 auto; height:86px; background:linear-gradient(180deg, color-mix(in srgb, var(--gb) 70%, transparent), transparent); pointer-events:none}
.ac > *{position:relative}
a.ac:hover{transform:translateY(-2px); box-shadow:var(--shadow-lg); border-color:var(--line-strong)}
.ac .ac-h{display:flex; align-items:center; gap:14px}
.ac .ac-h > div{min-width:0; flex:1}
.ac h3{font-size:1.18rem; margin-top:2px}
.ac .eyebrow{font-size:.68rem}
.ac .tl{color:var(--muted); font-size:.95rem; line-height:1.5}
.ac .am{display:flex; gap:6px 14px; flex-wrap:wrap; font-size:.84rem; color:var(--muted)}
.ac .am span{display:inline-flex; align-items:center; gap:5px}
.ac .am svg{width:15px; height:15px; color:var(--faint)}
.ac .ft{display:flex; align-items:center; gap:10px; margin-top:auto; padding-top:10px; border-top:1px solid var(--line)}
.ac .host{font-family:var(--f-mono); font-size:.76rem; color:var(--faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0}
.ac .go{font-weight:700; font-size:.9rem; color:var(--accent); white-space:nowrap}
.ac .prog{display:flex; align-items:center; gap:10px; font-size:.84rem; color:var(--muted)}
.ac .prog .bar{flex:1; height:8px}
.pin{position:absolute; top:12px; right:12px; z-index:2; width:34px; height:34px; border-radius:10px; border:0; background:transparent; color:var(--faint); cursor:pointer; display:grid; place-items:center}
.pin:hover{background:var(--sunk); color:var(--ink)}
.pin svg{width:18px; height:18px}
.pin[aria-pressed="true"]{color:var(--warm)}
.ac .ac-h{padding-right:28px}
.pill.live{background:var(--done-soft); color:var(--done)}
.pill.idea{background:var(--sunk); color:var(--muted); border:1px dashed var(--line-strong)}
.pill.soon{background:var(--warm-soft); color:var(--med)}
.ac.idea{background:color-mix(in srgb, var(--surface) 55%, transparent); border-style:dashed; box-shadow:none}
.ac.idea .glyph{filter:saturate(.55); opacity:.8}
.ac.idea::before{opacity:.45}
.ac.idea h3{color:var(--muted)}

/* list view */
.grid.list{grid-template-columns:1fr; gap:8px}
.grid.list .ac{flex-direction:row; align-items:center; padding:12px 16px; gap:16px}
.grid.list .ac::before{display:none}
.grid.list .ac .ac-h{flex:1; align-items:center; padding-right:0}
.grid.list .ac .glyph{width:40px; height:40px}
.grid.list .ac .glyph svg{width:24px; height:24px}
.grid.list .ac .tl{display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; font-size:.9rem}
.grid.list .ac > .tl, .grid.list .ac .tags, .grid.list .ac .host{display:none}
.grid.list .ac .am{flex:none; width:210px}
.grid.list .ac .ft{border:0; padding:0; margin:0; flex:none}
.grid.list .pin{position:static}
.grid.list .ac h3{font-size:1.05rem}

.empty-state{padding:40px 24px; text-align:center; color:var(--muted); border:1px dashed var(--line-strong); border-radius:18px; margin-top:24px}
.empty-state b{display:block; color:var(--ink); font-family:var(--f-head); font-size:1.2rem; margin-bottom:6px}

/* add an atlas */
.addbox{padding:24px 26px; margin-top:16px}
.addbox ol{margin:12px 0 0; padding-left:1.2rem; color:var(--muted)}
.addbox ol li{margin:6px 0}
.addbox pre{margin:16px 0 0; background:var(--code-bg); border:1px solid var(--line); border-radius:14px; padding:16px 18px; overflow:auto; font-family:var(--f-mono); font-size:.84rem; line-height:1.6; color:var(--ink)}
.addbox code{font-family:var(--f-mono); font-size:.86em; background:var(--sunk); padding:1px 6px; border-radius:6px}
.addbox pre .k{color:#4b47d6} .addbox pre .s{color:#9a5600} .addbox pre .c{color:#736e66}

/* sidebar */
.side .pl .sw{width:12px; height:12px; border-radius:4px; background:var(--gc); flex:none; margin:0 4px}
.side .grp-links{padding:0 4px}
.side .pl{margin-left:0; padding:8px 12px}
.side .sidelink .ct{margin-left:auto; font-size:.8rem; color:var(--side-faint); font-weight:500; font-variant-numeric:tabular-nums}
.side .sidenote{margin:22px 12px 8px; font-size:.84rem; color:var(--side-faint); line-height:1.5}
.side .sidenote a{color:var(--side-ink)}
.side .addlink{margin-top:6px}

@media (max-width:640px){
  .grid.list .ac .am{display:none}
  .tools{margin-top:32px}
  .trow .seg[aria-label="Layout"], .trow .grow{display:none}
}
@media (min-width:1360px){ .home{max-width:64rem; margin:0 auto} }
@media (min-width:1720px){ .home{max-width:72rem} }

/* the reference's inline styles */
.view-h{margin-top:28px}
.view-h h2{font-size:1.9rem}
.view-blurb{color:var(--muted)}
.seg .n{opacity:.6}
