/* Shared density: put useful content before oversized introductions. */
:root{--section-gap:18px}
#app>main.container{padding-top:18px;padding-bottom:28px}
.page-top{grid-template-columns:minmax(0,1fr) 220px;min-height:0;align-items:center;gap:24px;padding:0 0 14px;margin-bottom:18px}
.page-top-copy{gap:9px;padding:0}
.page-top h1{font-size:clamp(28px,2.6vw,36px);line-height:1.25;min-height:0}
.page-top p{font-size:15px;line-height:1.6;min-height:0}
.page-art{height:118px;min-height:0;grid-template-rows:28px 90px;margin:0}
.page-art figcaption{font-size:17px;line-height:1.15}
.page-art img{height:90px;width:160px}
.panel,.form-panel{padding:22px;margin-bottom:18px}
.side-card{padding:20px;margin-bottom:18px}
.section-head{min-height:0;margin-bottom:14px;gap:14px}
.section-head h2{font-size:24px}
.steps{padding:12px 20px;margin-bottom:18px}
.field{margin-bottom:16px}
.field input,.field textarea,.field select{margin-top:6px}
.field textarea{min-height:96px}
.check-grid{gap:10px;margin:12px 0 16px}
.check{padding:12px}
.design-section{padding:16px;margin-bottom:16px}
.design-section h3{margin-bottom:12px}
.form-panel .design-grid{gap:16px}
.screen-flow span{padding:12px 6px}
.tabs{margin:16px 0;padding:10px 0}
.request{padding:16px 0}
.workspace-row{padding:14px 0}
.workspace-stats{gap:12px;margin:16px 0}
.stat-tile{padding:14px;gap:12px}
.stat-tile .stat-icon{width:40px;height:40px}
.stat-tile b{font-size:24px}
.workspace-actions{padding:16px 20px;margin-bottom:18px}
.profile-cover{min-height:0;padding:24px;margin-bottom:18px}
.profile-cover .avatar{width:70px;height:70px}
.profile-cover h1{font-size:30px}
.guide-number{margin-bottom:18px}
.prompt{max-height:380px;padding:18px}

/* Home: tools first, with the research invitation immediately after them. */
.home-hero{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:30px;padding:0 10px 18px;align-items:center}
.hero-copy{padding:4px 0}
.home-hero .eyebrow{font-size:11px;letter-spacing:1px;margin-bottom:8px}
.home-hero h1{font-size:clamp(34px,3.2vw,44px);line-height:1.16;margin:0 0 10px}
.home-hero .hero-subtitle{font-size:15px;line-height:1.6;margin:0 0 14px}
.home-hero .idea-input{margin:0;padding:5px 5px 5px 10px}
.home-hero .idea-field{padding:0}
.home-hero .idea-input input:not([type=checkbox]){margin:0}
.home-hero .idea-input .btn{min-height:42px;padding:9px 12px}
.home-discovery-actions{margin-top:10px;gap:8px}
.home-discovery-actions .btn{padding:8px 14px}
.category-chips{margin-top:10px}
.category-chips .chip{padding:6px 10px;font-size:12px;gap:5px}
.category-chips .ui-icon{width:16px;height:16px}
.pipeline-scene{align-self:center;grid-template-rows:auto auto auto}
.scene-heading{grid-template-columns:minmax(0,1fr) 136px;gap:12px;min-height:84px;height:auto;padding:6px 8px 14px}
.hand-note{font-size:19px;line-height:1.15}
.sticky-note{width:136px;min-height:0;padding:9px;margin:0}
.sticky-note p{font-size:17px;line-height:1.1}
.english-note{display:none}
.pipeline{gap:12px;margin:0}
.pipeline .phase{min-height:0;padding:10px 3px}
.phase-icon{width:32px;height:32px;margin-bottom:4px}
.phase-icon .ui-icon{width:23px;height:23px}
.pipeline .number{width:14px;height:14px;line-height:14px;font-size:9px;margin-bottom:4px}
.pipeline b{font-size:12px;line-height:1.4}
.pipeline small{font-size:10px;line-height:1.3}
.pipe-connector{top:47px;right:-16px}
.scene-footer{min-height:0;height:70px;gap:16px;justify-content:flex-end;margin:0}
.scene-footer .hero-people{position:static;width:132px;height:70px}
.together-note{font-size:17px;line-height:1.15}
.home-works{padding:18px;margin-top:0}
.home-works .section-head{margin-bottom:14px}
.home-works .section-head h2{font-size:23px}
.home-works .section-head p{font-size:13px;margin-top:3px}
.home-works .grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.home-works .community-art{height:106px;padding:12px 8px}
.home-works .art-paper{min-height:74px;padding:8px 6px}
.home-works .art-groups{margin-top:6px}
.home-works .art-groups span{padding:3px 4px}
.home-works .art-emotions{font-size:21px;margin-top:5px}
.home-works .art-timer{font-size:31px;letter-spacing:3px}
.home-works .community-card h3{margin:8px 0 5px;font-size:15px}
.home-works .community-card .card-body{padding:11px}
.home-works .community-card .card-body>p{min-height:0;margin:0 0 8px;line-height:1.55}
.home-works .use-meta{margin:8px 0;gap:8px}
.home-works .card-bottom{padding-top:8px}
.home-bottom{gap:16px;margin-top:18px}
.home-bottom .panel{padding:18px}
.experiment-banner{padding:20px;gap:18px;margin:20px 0}
.experiment-banner h2{font-size:21px;margin-bottom:4px}
.experiment-banner .eyebrow{margin-bottom:5px}
.experiment-symbol{width:54px;height:54px;border-radius:15px}
.experiment-symbol>.ui-icon{width:28px;height:28px}

/* Discovery and forms share the same compact reading rhythm. */
.discovery-strip>div{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.discovery-strip .scene-chips{margin-top:0}
.discovery-strip{padding:16px 20px;gap:16px;margin-bottom:18px;border-radius:16px}
.scene-chips{gap:8px;margin-top:8px}
.scene-chip{padding:8px 12px}
.discovery-heading h2{font-size:24px}
.discovery-heading p{margin-top:3px}
.community-search{margin-bottom:16px}
.community-grid{gap:16px}
.community-card .card-body{padding:16px}
.community-card .card-body>p{margin-bottom:10px}
.community-art{height:150px;padding:18px}
.art-paper{min-height:90px;padding:12px}
.use-meta{margin:10px 0}
.community-card .card-bottom{padding-top:10px}
.community-detail,.publish-layout,.experiment-detail{gap:20px}
.detail-art .community-art{height:250px}
.detail-art .art-paper{min-height:150px;padding:22px}
.detail-actions .use-meta{margin:14px 0}
.discovery-related{margin:24px 0}
.classroom-notes,.build-note{margin-top:18px}
.classroom-note{padding:16px 0}
.classroom-note-form{padding:18px;margin-top:18px}
.publish-extra{padding:12px 0;margin-bottom:16px}
.publish-submit{margin-top:18px}
.lab-entry-grid{gap:18px}
.lab-entry-grid .panel{padding:24px}
.lab-icon{width:42px;height:42px;border-radius:12px;margin-bottom:12px}
.lab-icon .ui-icon{width:25px;height:25px}
.lab-entry-grid h2{font-size:23px}
.lab-principles{gap:22px;margin-top:18px}
.lab-principles h3{margin-top:6px}
.lab-principles b,.experiment-steps b{font-size:24px}
.experiment-steps{gap:12px;margin:18px 0}
.stories-heading{margin-bottom:18px}
.story-grid{gap:16px}

@media(min-width:761px) and (max-width:1100px){
 .home-hero{gap:20px;padding-inline:0}
 .home-hero h1{font-size:34px}
 .home-hero .eyebrow{font-size:10px}
 .home-hero .hero-subtitle{font-size:14px}
 .home-works .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .scene-heading{grid-template-columns:minmax(0,1fr) 118px}
 .sticky-note{width:118px}
 .hand-note{font-size:17px}
 .pipeline{gap:9px}
 .pipeline b{font-size:10px}
 .pipeline small{font-size:9px}
 .pipe-connector{right:-13px}
}

@media(max-width:760px){
 :root{--section-gap:14px}
 #app>main.container{padding:14px 16px 24px}
 .page-top{grid-template-columns:minmax(0,1fr) 72px;align-items:start;gap:10px;padding:0 0 12px;margin-bottom:14px}
 .page-top-copy{gap:7px}
 .page-top .breadcrumb{font-size:11px;line-height:18px}
 .page-top h1{font-size:26px;line-height:1.28;min-height:0}
 .page-top p{font-size:14px;line-height:1.55;min-height:0}
 .page-art{display:block;width:72px;height:76px;min-height:0;max-width:none;margin:20px 0 0}
 .page-art figcaption{display:none}
 .page-art img{display:block;width:72px;height:76px}
 .panel,.form-panel,.side-card{padding:17px;margin-bottom:14px}
 .section-head{gap:10px;margin-bottom:12px}
 .section-head h2{font-size:21px}
 .steps{padding:10px 6px;margin-bottom:14px}
 .field{margin-bottom:14px}
 .field textarea{min-height:88px}
 .field input,.field textarea,.field select,.search-box input{font-size:16px}
 .tabs{margin:12px 0}
 .home-hero{grid-template-columns:minmax(0,1fr);gap:12px;padding:0 0 16px}
 .hero-copy{padding:0}
 .home-hero .eyebrow{font-size:10px;letter-spacing:.4px;margin-bottom:8px}
 .home-hero h1{font-size:34px;line-height:1.15;margin-bottom:8px}
 .home-hero .hero-subtitle{font-size:14px;line-height:1.55;margin-bottom:12px}
 .home-hero .mobile-break{display:none}
 .home-hero .idea-input{display:flex;flex-wrap:wrap;padding:7px;gap:6px}
 .home-hero .idea-field{flex:1;min-width:0;padding:5px 0}
 .home-hero .idea-input input:not([type=checkbox]){font-size:16px}
 .home-hero .input-hint{display:none}
 .home-hero .idea-input .btn{width:100%;min-height:42px;padding:9px 12px}
 .home-discovery-actions{margin-top:8px}
 .home-discovery-actions .btn{min-height:42px;padding:8px 12px}
 .category-chips{gap:5px;margin-top:8px}
 .category-chips .chip{min-height:36px;font-size:11px;padding:6px 8px;gap:4px}
 .category-chips .ui-icon{display:none}
 .pipeline-scene{display:block;margin:0;padding:0}
 .scene-heading,.scene-footer{display:none}
 .pipeline{gap:7px;margin:0}
 .pipeline .phase{min-height:0;padding:8px 2px;border-radius:10px}
 .phase-icon{width:26px;height:26px;margin:0 auto 4px;border-radius:7px}
 .phase-icon .ui-icon{width:19px;height:19px}
 .pipeline .number,.pipeline small{display:none}
 .pipeline b{font-size:10px;line-height:1.4;letter-spacing:-.4px}
 .pipe-connector{top:23px;right:-11px}
 .pipe-connector .ui-icon{width:13px;height:13px}
 .home-works{padding:14px 12px}
 .home-works .section-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
 .home-works .section-head h2{font-size:20px}
 .home-works .section-head p{display:none}
 .home-works .section-head>.btn{font-size:12px;min-height:36px;padding:6px 10px}
 .home-works .grid{grid-template-columns:minmax(0,1fr);gap:10px}
 .community-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .community-grid>.community-card,.home-works .grid>.community-card{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:stretch}
 .community-grid>.community-card>a,.home-works .grid>.community-card>a{min-width:0;overflow:hidden}
 .community-grid>.community-card .community-art,.home-works .grid>.community-card .community-art{height:100%;min-height:128px;padding:8px 5px}
 .community-grid>.community-card .art-paper,.home-works .grid>.community-card .art-paper{width:100%;min-height:60px;padding:8px 3px}
 .community-grid>.community-card .art-paper small,.home-works .grid>.community-card .art-paper small{display:none}
 .community-grid>.community-card .art-doodle,.home-works .grid>.community-card .art-doodle{top:8px;left:8px}
 .community-grid>.community-card .art-emotions,.home-works .grid>.community-card .art-emotions{font-size:18px;white-space:normal;max-width:65px;margin:0 auto;line-height:1.6}
 .community-grid>.community-card .art-groups,.home-works .grid>.community-card .art-groups{gap:2px;margin-top:0}
 .community-grid>.community-card .art-groups span,.home-works .grid>.community-card .art-groups span{padding:3px 2px;font-size:8px}
 .community-grid>.community-card .art-timer,.home-works .grid>.community-card .art-timer{font-size:22px;letter-spacing:1px}
 .community-grid>.community-card .art-question,.home-works .grid>.community-card .art-question{font-size:11px;margin:0}
 .community-grid>.community-card .art-speech,.home-works .grid>.community-card .art-speech{font-size:9px}
 .community-grid>.community-card .art-checks,.home-works .grid>.community-card .art-checks{width:auto;font-size:10px}
 .community-grid>.community-card .card-body,.home-works .community-card .card-body{padding:12px}
 .community-grid>.community-card h3,.home-works .community-card h3{font-size:16px;line-height:1.4;margin:6px 0}
 .community-grid>.community-card .card-body>p,.home-works .community-card .card-body>p{font-size:13px;line-height:1.5;margin-bottom:8px;min-height:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .community-card .meta{font-size:10px;gap:4px;flex-wrap:wrap}
 .community-card .tag{font-size:10px}
 .community-card .use-meta{font-size:11px;gap:8px;margin:6px 0}
 .community-card .card-bottom{padding-top:7px;flex-direction:row;flex-wrap:wrap;align-items:center}
 .community-card .byline{font-size:11px}
 .community-card .byline .avatar{width:22px;height:22px}
 .experiment-banner{padding:16px;gap:12px;margin:16px 0}
 .experiment-banner h2{font-size:18px}
 .experiment-symbol{display:none}
 .experiment-banner>.btn{min-height:42px}
 .discovery-strip>div{display:block}
 .discovery-strip .scene-chips{margin-top:8px}
 .discovery-strip{padding:14px;margin-bottom:14px}
 .scene-chips{gap:6px;margin-top:8px}
 .scene-chip{font-size:12px;padding:8px 10px;min-height:40px}
 .discovery-strip>.btn{margin-top:12px;min-height:42px}
 .discovery-heading{flex-wrap:wrap;gap:6px}
 .discovery-heading h2{font-size:21px}
 .discovery-heading p{font-size:13px}
 .community-search{gap:8px;margin-bottom:14px}
 .community-detail,.publish-layout,.experiment-detail{gap:14px}
 .detail-art .community-art{height:190px}
 .detail-art .art-paper{padding:16px;min-height:110px}
 .detail-art .art-timer{font-size:48px}
 .lab-entry-grid .panel{padding:18px}
 .lab-entry-grid h2{font-size:21px}
 .lab-icon{float:right;width:38px;height:38px;margin:0 0 8px 12px}
 .lab-principles{margin-top:14px;gap:12px}
 .lab-principles>div{padding-bottom:8px}
 .lab-principles b{font-size:20px}
 .profile-cover{padding:20px;gap:14px}
 .profile-cover h1{font-size:26px}
 .workspace-stats{gap:8px;margin:12px 0}
 .stat-tile{padding:12px}
 .stat-tile .stat-icon{width:32px;height:32px}
 .stat-tile b{font-size:22px}
 .workspace-actions{padding:16px;margin-bottom:14px;gap:12px}
 .publish-layout>aside{order:0}
 .publish-layout>aside .community-art{height:120px}
 .publish-layout>aside .card-body{display:block}
 .publish-extra summary{line-height:1.6}
 .publish-submit{margin-top:14px}
 .request{padding:14px 0}
 .stories-heading{gap:12px;margin-bottom:14px}
 .home-bottom{margin-top:16px}
}
@media(max-width:360px){
 .home-hero h1{font-size:30px}
 .category-chips .chip{font-size:10px;padding-inline:6px}
 .page-top{grid-template-columns:minmax(0,1fr) 56px;gap:8px}
 .page-art,.page-art img{width:56px;height:64px}
 .page-top h1{font-size:24px}
 .community-grid>.community-card,.home-works .grid>.community-card{grid-template-columns:78px minmax(0,1fr)}
}


/* A single discovery heading; filter tools stay next to their label. */
.discovery-strip{display:block}
.discovery-strip>div{display:block}
.discovery-filter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.discovery-result-count{font-size:12px;color:var(--muted);margin-bottom:8px}
@media(min-width:1001px){
 .discovery-strip>div{display:flex;flex-direction:row-reverse;justify-content:space-between;gap:18px}
 .discovery-filter-heading{margin:0}
 .discovery-filter-heading .discovery-label{display:none}
}
@media(max-width:760px){
 .discovery-strip{padding:12px 14px}
 .discovery-filter-heading .btn{min-height:38px;white-space:nowrap}
 .community-detail{display:grid;grid-template-columns:minmax(0,1fr)}
 .community-detail>.detail-actions{display:contents}
 .community-detail>.detail-actions>.side-card:first-child{grid-row:1}
 .community-detail>.detail-actions>.side-card{margin:0}
 .community-detail>.detail-actions>.side-card:first-child .detail-small{margin-top:10px!important}
 .community-detail>.detail-actions>.side-card:first-child .use-meta{margin:10px 0}
}

/* Keep the guide available below mobile forms without covering their actions. */
@media(max-width:760px){
  .account-form input:not([type=checkbox]),#community-publish input:not([type=checkbox]),
  #community-publish textarea,#community-publish select{font-size:16px}
  body:has(.account-form,#community-publish) #gai-assistant{
    position:relative;inset:auto;margin:0 16px calc(16px + env(safe-area-inset-bottom,0px));
  }
  body:has(.account-form,#community-publish) .gai-panel{
    position:fixed;left:14px;right:14px;width:auto;max-width:none;
  }
}
