:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --link: #0066cc;
  --border: #d2d2d7;
  --bg-alt: #f5f5f7;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
@supports (overflow: clip) { body { overflow-x: clip; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.47; color: var(--text); background: #fff; letter-spacing: -0.022em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }

.globalnav { background: rgba(22, 22, 23, 0.92); color: #e8e8ed; height: 44px; font-size: 12px; }
.globalnav .wrap { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.globalnav .brand { color: #e8e8ed; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.globalnav .brand:hover { text-decoration: none; }
.globalnav .logo { width: 16px; height: 16px; margin-top: -2px; }
.globalnav .unofficial { color: #a1a1a6; }

.localnav { border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.95); position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(20px); }
.localnav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.localnav-title { font-size: 21px; font-weight: 600; color: var(--text); }
.localnav-title:hover { text-decoration: none; }
.localnav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; font-size: 14px; }
.localnav ul a { color: var(--text); }
.localnav ul a.current { color: var(--muted); }

.announcement { background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 14px; padding: 14px 0; text-align: center; color: var(--text); }

main { min-height: 60vh; padding-bottom: 60px; }

.hero { text-align: center; padding: 56px 0 40px; }
.hero h1 { font-size: 48px; line-height: 1.08; font-weight: 600; letter-spacing: -0.003em; margin: 0 0 12px; }
.hero p { font-size: 21px; color: var(--muted); margin: 0 0 28px; }

.searchbar { display: flex; max-width: 640px; margin: 0 auto 8px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.searchbar input { flex: 1; border: 0; padding: 14px 16px; font: inherit; font-size: 17px; outline: none; min-width: 0; }
.searchbar button { border: 0; background: var(--link); color: #fff; font: inherit; font-size: 15px; padding: 0 22px; cursor: pointer; }
.searchbar:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2); }

.section-title { font-size: 24px; font-weight: 600; margin: 48px 0 20px; }
.section-title .count, .count { color: var(--muted); font-weight: 400; font-size: 0.75em; margin-left: 6px; }
.page-title { font-size: 40px; font-weight: 600; line-height: 1.1; margin: 16px 0 8px; }


.more { text-align: center; color: var(--muted); font-size: 15px; }

.thread-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.thread-item { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.thread-item h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.thread-item h4 a { color: var(--text); }
.thread-item h4 a:hover { color: var(--link); }
.meta { margin: 0; font-size: 13px; color: var(--muted); }
.empty { padding: 24px 4px; color: var(--muted); border-bottom: 1px solid var(--border); list-style: none; }

.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

.breadcrumbs { font-size: 13px; color: var(--muted); padding-top: 20px; }
.subcommunities { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.subcommunities a { display: inline-block; border: 1px solid var(--border); border-radius: 980px; padding: 6px 14px; font-size: 14px; color: var(--text); }
.subcommunities a:hover { border-color: var(--link); color: var(--link); text-decoration: none; }

.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; font-size: 14px; margin: 16px 0; }
.page-of { color: var(--muted); }

.browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 40px; }
.browse-group { border-top: 1px solid var(--border); padding: 12px 0; }
.browse-group h3 { margin: 0 0 6px; font-size: 19px; }
.browse-group ul { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.9; }

.post { border: 1px solid var(--border); border-radius: 18px; padding: 24px 28px; margin-bottom: 16px; }
.post.question { background: var(--bg-alt); border: 0; }
.post-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.post-author { font-weight: 600; font-size: 15px; color: var(--text); }
.author-badge { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.post-level { font-size: 12px; color: var(--muted); }
.thread-title { font-size: 28px; line-height: 1.15; font-weight: 600; margin: 4px 0 12px; }
.post-body { overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto; }
.post-body pre, .post-body code { white-space: pre-wrap; font-size: 14px; background: rgba(0, 0, 0, .04); border-radius: 6px; }
.post-body pre { padding: 12px; }
.post-body blockquote { margin: 8px 0; padding-left: 14px; border-left: 3px solid var(--border); color: var(--muted); }
.post-date { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.original-link { font-size: 12px; color: var(--muted); }

.profile { display: flex; gap: 20px; align-items: center; margin-top: 16px; }
.profile .avatar { width: 80px; height: 80px; font-size: 28px; }
.profile .page-title { margin: 0; }

.stats-row { display: flex; justify-content: center; gap: 60px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); text-align: center; }
.stats-row strong { display: block; font-size: 32px; font-weight: 600; }
.stats-row span { font-size: 14px; color: var(--muted); }

.footer { background: var(--bg-alt); color: var(--muted); font-size: 12px; padding: 20px 0 32px; border-top: 1px solid var(--border); }
.footer-links a { color: var(--text); }

@media (max-width: 734px) {
  body { font-size: 15px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 17px; }
  .page-title { font-size: 28px; }
  .globalnav .unofficial { display: none; }
  .post { padding: 18px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles-small { grid-template-columns: repeat(3, 1fr); }
}

.notice { border: 1px solid var(--border); background: var(--bg-alt); border-radius: 12px; padding: 18px 24px; margin-top: 24px; font-size: 15px; }
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin-bottom: 0; }
.arrow-link { font-size: 15px; }
.arrow-link::after { content: " ›"; }
.section-title.center, .big-title, .subtitle { text-align: center; }
.big-title { font-size: 40px; font-weight: 600; margin: 72px 0 8px; }
.subtitle { color: var(--muted); margin: 0 0 32px; }
.more-topics { margin-top: 8px; }
.more-topics summary { list-style: none; text-align: center; color: var(--link); cursor: pointer; font-size: 15px; padding: 10px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.more-topics summary::-webkit-details-marker { display: none; }
.more-topics summary::after { content: " ›"; }
.more-topics[open] summary { display: none; }
.tip-list { max-width: 640px; margin: 0 auto; }
.tip-card { display: flex; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.tip-card .avatar { width: 96px; height: 96px; font-size: 32px; }
.tip-card h3 { margin: 0 0 8px; font-size: 21px; }
.tip-card h3 a { color: var(--text); }
.tip-excerpt { margin: 0 0 10px; color: var(--muted); }
.newcomer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--bg-alt); border-radius: 18px; margin-top: 32px; }
.newcomer-grid > div { padding: 32px 28px; text-align: center; }
.newcomer-grid > div + div { border-left: 1px solid var(--border); }
.newcomer-grid h3 { font-size: 17px; margin: 0 0 8px; }
.newcomer-grid p { font-size: 14px; color: var(--muted); }
@media (max-width: 734px) {
  .newcomer-grid { grid-template-columns: 1fr; }
  .newcomer-grid > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .tip-card .avatar { width: 56px; height: 56px; font-size: 20px; }
  .big-title { font-size: 28px; }
}

.search-title { text-align: center; font-size: 40px; font-weight: 600; margin: 48px 0 28px; }
.search-field { position: relative; max-width: 640px; margin: 0 auto; border: 1px solid var(--border); border-radius: 12px; padding: 8px 16px 6px; background: #fff; }
.search-field:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2); }
.search-field label { display: block; font-size: 11px; color: var(--muted); }
.search-field input[type=search] { width: 100%; border: 0; outline: none; font: inherit; font-size: 17px; padding: 0; background: none; }
.segmented { display: flex; justify-content: center; gap: 4px; width: max-content; margin: 20px auto 0; padding: 3px; border-radius: 980px; background: var(--bg-alt); }
.segmented button { border: 0; background: none; font: inherit; font-size: 13px; padding: 6px 16px; border-radius: 980px; cursor: pointer; color: var(--text); }
.segmented button[aria-selected=true] { background: var(--text); color: #fff; }
.search-layout { display: grid; grid-template-columns: 200px 1fr; gap: 48px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.results-count { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.filters details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.filters summary { cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "⌄"; color: var(--muted); }
.filters details[open] summary::after { content: "⌃"; }
.filters select, .filters input { width: 100%; margin-top: 10px; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.filters-hidden details { display: none; }
.result-list { list-style: none; padding: 0; margin: 0; }
.result { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.result h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.result h3 a { color: var(--text); }
.result-snippet { margin: 0 0 8px; font-size: 15px; color: #333; }
.result-meta { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.reply-count { color: var(--muted); }
@media (max-width: 734px) {
  .search-layout { grid-template-columns: 1fr; gap: 16px; }
  .search-title { font-size: 28px; }
}

.welcome-card-unused { display: flex; gap: 14px; align-items: flex-start; text-align: left; max-width: 640px; margin: 28px auto 0; padding: 16px 20px;
  border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.welcome-card:hover { text-decoration: none; border-color: var(--link); }
.welcome-card .arrow-link { display: inline-block; margin-top: 4px; color: var(--link); font-size: 14px; }
.announcement-post .post-body h2 { font-size: 21px; margin: 28px 0 8px; }

/* product tiles */
.tiles { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tiles-small { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 20px; margin-top: 8px; }
.tile a { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 6px; color: var(--text); border-radius: 18px; }
.tile a:hover { text-decoration: none; }
.tile img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 14px; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.tiles-small .tile img { width: 64px; height: 64px; margin-bottom: 10px; }
.tile a:hover img { transform: scale(1.08) translateY(-4px); }
.tile-name { font-size: 14px; font-weight: 400; }
.tile a:hover .tile-name { color: var(--link); }

/* hero */
.hero .searchbar button { display: flex; align-items: center; padding: 0 18px; }
.hero .searchbar svg { width: 18px; height: 18px; }
.hero-band { position: relative; width: 100vw; margin-left: calc(50% - 50vw); background: linear-gradient(#fff, #f5f5f7); overflow: hidden; margin-top: 8px; }
.hero-collage { display: block; width: 100%; height: auto; }
.motion .hero-collage { animation: collage-in 1.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes collage-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.welcome-toast { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: flex-start;
  width: min(640px, calc(100% - 32px)); padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.92); color: var(--text);
  font-size: 13px; line-height: 1.4; box-shadow: 0 10px 40px rgba(0,0,0,.12); backdrop-filter: saturate(180%) blur(20px); }
.welcome-toast:hover { text-decoration: none; }
.welcome-toast img { flex: none; width: 48px; height: auto; }
.welcome-toast .arrow-link { display: inline-block; margin-top: 2px; color: var(--link); font-size: 13px; }
.motion .welcome-toast { animation: toast-in .8s .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -24px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* featured + newcomers */
.center { text-align: center; }
.tip-avatar { flex: none; }
.avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-alt); }
.tip-card .avatar-img { width: 120px; height: 120px; }
.newcomers { text-align: center; margin-top: 80px; }
.newcomers-icon { display: block; margin: 0 auto -48px; opacity: .8; }
.pill-button { display: inline-block; background: var(--link); color: #fff; border-radius: 980px; padding: 8px 22px; font-size: 15px; }
.pill-button:hover { text-decoration: none; background: #0077ed; }
.newcomer-grid img { display: block; margin: 0 auto 16px; height: 72px; width: auto; }

/* community + browse headers */
.community-header { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.community-header img { width: 80px; height: 80px; object-fit: contain; }
.browse-group h3 a { display: inline-flex; align-items: center; gap: 10px; }
.browse-group h3 img { width: 36px; height: 36px; object-fit: contain; }

/* reveal on scroll */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms); }
.motion .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 734px) {
  .tiles, .tiles-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tip-card .avatar-img { width: 64px; height: 64px; }
  .tile img { width: 72px; height: 72px; }
  .welcome-toast { position: relative; top: auto; left: auto; transform: none; margin: -24px auto 16px; }
  .motion .welcome-toast { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-collage, .welcome-toast { animation: none !important; }
  .tile img { transition: none; }
}
